-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 864 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (22 loc) · 864 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
FROM python:3.12-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
g++ \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy source files needed for package installation
COPY pyproject.toml setup.py README.md ./
COPY app/ app/
COPY open_deep_video_research/ open_deep_video_research/
# Install package and dependencies (production install, not editable)
RUN pip install --no-cache-dir .
# Pre-download tiktoken encodings to avoid Azure timeout at runtime
RUN python -c "import tiktoken; tiktoken.get_encoding('cl100k_base')"
# Copy cache and data directories (includes video_cache.json and embeddings)
COPY data/ data/
COPY cache/ cache/
EXPOSE 8000
# Use PORT environment variable from Railway (shell form for variable expansion)
CMD ["sh", "-c", "python -m app --host 0.0.0.0 --port ${PORT:-8000}"]