-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (24 loc) · 888 Bytes
/
Dockerfile
File metadata and controls
34 lines (24 loc) · 888 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
29
30
31
32
33
34
FROM nvidia/cuda:12.6.0-runtime-ubuntu22.04
# Install Python 3.12 + system deps
RUN apt-get update && \
apt-get install -y python3-pip python3-dev python-is-python3 ffmpeg libsm6 libxext6 libgl1-mesa-glx && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python dependencies
COPY requirements.txt .
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy backend code and .env
COPY backend/ ./backend
COPY .env /app/.env
# Copy wait script
COPY wait-for-it.sh /wait-for-it.sh
RUN chmod +x /wait-for-it.sh
# Copy sample data (ensure ml_models is inside backend)
COPY data/ /app/data
COPY GenD_PE_L/ /app/GenD_PE_L
EXPOSE 8000
WORKDIR /app/backend
# Run FastAPI (reload for dev)
CMD /wait-for-it.sh postgres:5432 --timeout=5 -- uvicorn main:app --host 0.0.0.0 --port 8000 --reload