-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (22 loc) · 776 Bytes
/
Copy pathDockerfile
File metadata and controls
28 lines (22 loc) · 776 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
# Use official PyTorch runtime base image with CUDA support
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
# Set working directory inside container
WORKDIR /app
# Install system dependencies needed for OpenCV, MediaPipe, and Pygame audio
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libgl1-mesa-glx \
libglib2.0-0 \
libasound2 \
libsdl2-2.0-0 \
libsdl2-mixer-2.0-0 \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements file first to leverage Docker build cache
COPY requirements.txt .
# Install Python packages
RUN pip install --no-cache-dir -r requirements.txt
# Copy project files into the container
COPY . .
# Set default command (run main.py training script)
CMD ["python", "main.py"]