-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (44 loc) · 1.43 KB
/
Copy pathDockerfile
File metadata and controls
55 lines (44 loc) · 1.43 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# ---------------------------------------------------------------
# © 2025 Mobile Perception Systems Lab at TU/e. All rights reserved.
# Licensed under the MIT License.
# ---------------------------------------------------------------
# Use NVIDIA CUDA base image with PyTorch pre-installed
FROM nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
python3.10 \
python3.10-dev \
python3-pip \
python3-setuptools \
git \
wget \
curl \
build-essential \
libssl-dev \
libffi-dev \
&& rm -rf /var/lib/apt/lists/*
# Create symbolic links for python3.10
RUN ln -sf /usr/bin/python3.10 /usr/bin/python3 && \
ln -sf /usr/bin/python3.10 /usr/bin/python
# Upgrade pip
RUN python3 -m pip install --upgrade pip setuptools wheel
# Set working directory
WORKDIR /app
# Copy project files
COPY . /app/
# Install Python dependencies
RUN pip install -r requirements.txt
# Create directories for data and outputs
RUN mkdir -p /app/data /app/outputs /app/checkpoints /app/logs
# Set environment variables for training
ENV PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512
ENV TORCH_LOGS=-dynamo
# Default command
ENTRYPOINT ["python", "main.py"]
CMD ["--help"]