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

Dockerfile 535 B

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
  1. FROM python:3.11-slim
  2. WORKDIR /app
  3. ENV PYTHONPATH=/app
  4. ENV FLASK_APP=app.py
  5. ENV FLASK_ENV=production
  6. RUN apt-get update && apt-get install -y \
  7. gcc \
  8. && rm -rf /var/lib/apt/lists/*
  9. COPY requirements.txt .
  10. RUN pip install --no-cache-dir -r requirements.txt
  11. COPY . .
  12. RUN mkdir -p artifacts/model_trainer
  13. # Expose port
  14. EXPOSE 5000
  15. # Health check
  16. HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
  17. CMD curl -f http://localhost:5000/health || exit 1
  18. # Run the application
  19. CMD ["python", "app.py"]
Tip!

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

Comments

Loading...