-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (16 loc) · 704 Bytes
/
Dockerfile
File metadata and controls
24 lines (16 loc) · 704 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
FROM python:3.12-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 libglib2.0-0 && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Cloud Run binds to $PORT on 0.0.0.0; the VM deploy keeps its own gunicorn.conf.py
RUN cp gunicorn.cloudrun.py gunicorn.conf.py
# Pre-compute every practical's default outputs and bake them into the image
# so /practical/N renders the result figures instantly and prints them as-is.
# This downloads the Gonzalez & Woods CH02 + CH03 datasets at build time.
RUN python precompute.py
EXPOSE 8080
CMD ["gunicorn", "-c", "gunicorn.conf.py", "run:app"]