You have a Python pipeline. Your job is to make it reproducible, containerized, and shippable through CI.
week5-container-assignment/
├── .github/
│ └── workflows/
│ └── ci.yml ← Task 6: CI workflow (fill in the TODO steps)
├── src/
│ └── pipeline.py ← Task 1 & 5: pipeline logic and env-var config
├── tests/
│ └── test_pipeline.py ← Task 3: provided tests; make them pass
├── Dockerfile ← Task 4: write a cache-friendly Dockerfile
├── requirements.txt ← Task 2: pin all dependencies
└── AI_ASSIST.md ← Task 8: document your LLM usage
Docker and the Azure CLI are pre-installed. Before Task 7, sign in with your HackYourFuture account (not a personal Azure account), targeting the HackYourFuture tenant:
az login --use-device-code --tenant 07a14c4e-d88c-42f7-83b3-13af7e57ff3dThese task numbers match the Week 5 assignment chapter in your HackYourFuture Notion curriculum.
💡 Task 7 credentials: the
AZURE_CREDENTIALSJSON your CI needs in Task 7 is the same for every student in the cohort. Your teacher DMs it to you over Slack. Ping your teacher in your cohort channel if you have not received it by the time you reach Task 7.
| Task | What you do |
|---|---|
| 1: Choose a Pipeline | The starter src/pipeline.py has three functions with raise NotImplementedError. Implement them so the provided tests pass. |
| 2: Define Dependencies | Fill in requirements.txt with pinned versions (package==version). |
| 3: Write Tests | The starter ships a full test suite in tests/test_pipeline.py. Make your Task 1 implementation pass it: API_KEY=test pytest -q. |
| 4: Write a Dockerfile | Complete the Dockerfile following the TODO comments. |
| 5: Add Configuration | get_config() must read API_KEY from the environment and raise a clear error if it is missing. |
| 6: Build a CI Workflow | Replace the echo "TODO" steps in ci.yml with real commands. |
| 7: Push to ACR | Add Azure login + ACR push steps to your workflow; screenshot the result. |
| 8: AI Report | Fill in AI_ASSIST.md with your LLM prompt, the suggestion, and what you changed. |
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
API_KEY=test pytest -qdocker build -t my-pipeline:1.0 .
docker run --rm -e API_KEY=test my-pipeline:1.0- Create a branch:
git switch -c week5/your-name - Commit your work.
- Push and open a Pull Request against
main. - Share the PR URL with your teacher.
See the full assignment instructions in your HackYourFuture Notion curriculum for the Task 7 (ACR push) steps.