-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (30 loc) · 914 Bytes
/
Dockerfile
File metadata and controls
40 lines (30 loc) · 914 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
35
36
37
38
39
40
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
# Install Python and UV
RUN apt-get update && apt-get install -y \
python3.12 \
python3-pip \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Install UV
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.cargo/bin:$PATH"
# Set working directory
WORKDIR /workspace
# Copy dependency files first for better caching
COPY pyproject.toml uv.lock ./
# Install dependencies
RUN uv python install 3.12
RUN uv venv && . .venv/bin/activate && uv pip install -e ".[dev]"
# Copy project files
COPY . /workspace/
# Create data directory
RUN mkdir -p /workspace/data /workspace/checkpoints
# Set environment variables
ENV PYTHONPATH="/workspace/src:$PYTHONPATH"
ENV CUDA_VISIBLE_DEVICES=0
# Create demo script
COPY docker/demo.sh /workspace/demo.sh
RUN chmod +x /workspace/demo.sh
# Default command runs the demo
CMD ["./demo.sh"]