Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +12 -2
Dockerfile
CHANGED
@@ -1,16 +1,26 @@
|
|
|
|
1 |
FROM nvidia/cuda:11.3.1-cudnn8-runtime-ubuntu20.04
|
2 |
|
|
|
3 |
WORKDIR /app
|
4 |
|
|
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
python3 \
|
7 |
python3-pip \
|
|
|
|
|
|
|
8 |
&& rm -rf /var/lib/apt/lists/*
|
9 |
|
|
|
10 |
COPY requirements.txt .
|
11 |
|
12 |
-
|
|
|
13 |
|
|
|
14 |
COPY . .
|
15 |
|
16 |
-
|
|
|
|
1 |
+
# Use the official NVIDIA CUDA image with cuDNN support
|
2 |
FROM nvidia/cuda:11.3.1-cudnn8-runtime-ubuntu20.04
|
3 |
|
4 |
+
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Install Python, Rust, Cargo, and other dependencies
|
8 |
RUN apt-get update && apt-get install -y \
|
9 |
python3 \
|
10 |
python3-pip \
|
11 |
+
curl \
|
12 |
+
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
|
13 |
+
&& . "$HOME/.cargo/env" \
|
14 |
&& rm -rf /var/lib/apt/lists/*
|
15 |
|
16 |
+
# Copy the requirements.txt file into the container at /app
|
17 |
COPY requirements.txt .
|
18 |
|
19 |
+
# Install the dependencies
|
20 |
+
RUN . "$HOME/.cargo/env" && pip3 install --no-cache-dir -r requirements.txt
|
21 |
|
22 |
+
# Copy the rest of the application code into the container at /app
|
23 |
COPY . .
|
24 |
|
25 |
+
# Run the training script
|
26 |
+
CMD ["python3", "train.py"]
|