-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 869 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (22 loc) · 869 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
# -----------------------------------------------------------
# RealityStream ML – Cloud Run container
# -----------------------------------------------------------
# Build: docker build -t realitystream .
# Run: docker run -p 8080:8080 realitystream
# Deploy: gcloud run deploy realitystream --source .
# -----------------------------------------------------------
FROM python:3.11-slim
# Prevent Python from buffering stdout/stderr
ENV PYTHONUNBUFFERED=1
WORKDIR /app
# Install dependencies first (layer caching)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY run_models.py app.py ./
COPY parameters/ parameters/
# Cloud Run uses PORT env variable (default 8080)
ENV PORT=8080
EXPOSE 8080
# Use gunicorn for production
CMD exec gunicorn --bind :$PORT --workers 1 --threads 4 --timeout 300 app:app