Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

Makefile 1.7 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
  1. init:
  2. @echo Initialise environment
  3. uv venv --python 3.10
  4. uv init && rm hello.py
  5. uv tool install black
  6. install:
  7. @echo Install dependencies
  8. . .venv/bin/activate
  9. # uv pip install --all-extras --requirement pyproject.toml
  10. # uv pip sync requirements.txt
  11. uv add -r requirements.txt
  12. delete:
  13. rm uv.lock pyproject.toml .python-version && rm -rf .venv
  14. env:
  15. cp .env.example .env
  16. fetch-data:
  17. @echo downloading data from Kaggle...
  18. uv run -m src.fetch_data
  19. pipeline:
  20. @echo running pipeline...
  21. uv run -m src.pipeline
  22. quality_checks:
  23. @echo "Running quality checks"
  24. uv run -m isort .
  25. uv run -m black .
  26. prefect:
  27. @echo "Starting Prefect server..."
  28. uv run prefect server start &
  29. fetch-model:
  30. uv run -m src.fetch_model
  31. serve_local:
  32. uv run -m src.serve_local
  33. build:
  34. docker build -t tumor-api .
  35. run:
  36. docker run -d -p 9696:9696 tumor-api
  37. SAMPLE_IMAGE = data/brain-tumor-mri/Testing/notumor/Te-no_0010.jpg
  38. runc:
  39. curl -X POST http://localhost:9696/predict \
  40. -F "file=@$(SAMPLE_IMAGE)"
  41. serve:
  42. uv run -m src.serve
  43. # Clean generated files
  44. clean:
  45. @echo "🧹 Cleaning up..."
  46. find . -type f -name "*.pyc" -delete
  47. find . -type d -name "__pycache__" -delete
  48. find . -type d -name "*.egg-info" -exec rm -rf {} +
  49. rm -rf .pytest_cache
  50. rm -rf htmlcov
  51. rm -rf .coverage
  52. @echo "✅ Cleanup completed"
  53. test:
  54. @echo "Running tests..."
  55. uv run -m pytest -v
  56. ecr:
  57. @echo "Building and pushing Docker image to ECR..."
  58. uv run chmod +x ecr.sh
  59. uv run ./ecr.sh
  60. ecs:
  61. @echo "Deploying Docker image to ECS..."
  62. uv run chmod +x ecs.sh
  63. uv run ./ecs.sh
  64. test-serve:
  65. @echo "Testing the model serving..."
  66. uv run curl -X POST http://13.220.250.182/predict -F "file=@data/brain-tumor-mri/Testing/notumor/Te-no_0010.jpg"
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...