forked from Gopher-Industries/NutriHelp-AI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
28 lines (20 loc) · 672 Bytes
/
dockerfile
File metadata and controls
28 lines (20 loc) · 672 Bytes
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
# Dockerfile
FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy only requirements first to leverage Docker cache
COPY requirements.txt .
# Install Python dependencies
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy app code last (this is what changes most often)
COPY nutrihelp_ai/ ./nutrihelp_ai/
# Expose port
EXPOSE 8000
# Run the app
CMD ["uvicorn", "nutrihelp_ai.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]