-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·64 lines (47 loc) · 1.52 KB
/
Dockerfile
File metadata and controls
executable file
·64 lines (47 loc) · 1.52 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
56
57
58
59
60
61
62
63
64
FROM nvcr.io/nvidia/pytorch:22.01-py3
# Install system dependencies
ENV TZ=Europe/Berlin \
DEBIAN_FRONTEND=noninteractive
# Install required packages for adding repositories
RUN apt-get update && apt-get install -y \
curl \
build-essential \
wget \
gnupg \
python3-setuptools \
software-properties-common
# Add the PackageCloud repository for git-lfs
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
# Install git-lfs
RUN apt-get update && apt-get install -y git-lfs
# Initialize git-lfs
RUN git lfs install
# Clean up
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install Rust
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Set working directory
WORKDIR /workspace
# Install core build dependencies
RUN python3 -m pip install --no-cache-dir --upgrade \
pip \
setuptools==68.0.0 \
wheel \
setuptools_scm
RUN pip install --upgrade pip
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
# Install dependencies one by one to handle build issues
RUN while read requirement; do \
echo "Installing $requirement..." && \
pip install --no-cache-dir $requirement || pip install --no-cache-dir --no-deps $requirement; \
done < requirements.txt
RUN pip install --upgrade packaging
# Copy project files
COPY . .
# Install package in development mode without dependencies
RUN pip install --no-deps -e .
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*