forked from thrixxy-technologies/flavorsnap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
47 lines (37 loc) · 1.07 KB
/
Copy pathDockerfile.dev
File metadata and controls
47 lines (37 loc) · 1.07 KB
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
# Development Dockerfile for FlavorSnap - Backend
# Optimized for hot reloading and development workflow
FROM python:3.9-slim
WORKDIR /app
# Install system dependencies for development
RUN apt-get update && apt-get install -y \
build-essential \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
libgomp1 \
curl \
vim \
git \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY ml-model-api/requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir flask-cors pytest pytest-cov black flake8
# Copy application code
COPY model.pth ./
COPY ml-model-api/ ./
# Create directories
RUN mkdir -p /app/uploads /app/logs
# Expose development port
EXPOSE 5000
# Environment variables for development
ENV FLASK_ENV=development
ENV FLASK_DEBUG=1
ENV PYTHONPATH=/app
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:5000/health || exit 1
# Start development server with hot reload
CMD ["python", "app.py"]