Spaces:
Runtime error
Runtime error
kundaja-green
commited on
Commit
·
97d39bb
1
Parent(s):
0718f3e
CRITICAL FIX: Use correct Dockerfile and cleaned requirements.txt
Browse files- Dockerfile +25 -27
- requirements.txt +2 -10
Dockerfile
CHANGED
@@ -1,33 +1,31 @@
|
|
1 |
-
# Use
|
2 |
-
FROM
|
3 |
|
4 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
WORKDIR /code
|
6 |
|
7 |
-
# Install
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
&& rm -rf /var/lib/apt/lists/*
|
18 |
-
|
19 |
-
# Copy the requirements file first to leverage Docker cache
|
20 |
-
COPY requirements.txt .
|
21 |
-
|
22 |
-
# Install the correct CUDA-enabled PyTorch version and other requirements
|
23 |
-
RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
|
24 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
25 |
-
|
26 |
-
# Copy all project files, including the start.sh script
|
27 |
COPY . .
|
28 |
|
29 |
-
# Make the
|
30 |
-
RUN chmod +x start.sh
|
31 |
|
32 |
-
#
|
33 |
-
CMD ["./start.sh"]
|
|
|
1 |
+
# Use an NVIDIA CUDA runtime as the base image for GPU support
|
2 |
+
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
|
3 |
|
4 |
+
# Avoid prompts during package installation
|
5 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
6 |
+
|
7 |
+
# Install system dependencies: Python, pip, git, and git-lfs
|
8 |
+
RUN apt-get update && \
|
9 |
+
apt-get install -y python3.11 python3-pip git git-lfs && \
|
10 |
+
rm -rf /var/lib/apt/lists/*
|
11 |
+
|
12 |
+
# Set the working directory
|
13 |
WORKDIR /code
|
14 |
|
15 |
+
# Install the correct GPU-enabled PyTorch version for CUDA 12.1
|
16 |
+
RUN pip3 install torch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 --index-url https://download.pytorch.org/whl/cu121
|
17 |
+
|
18 |
+
# Copy your cleaned requirements file
|
19 |
+
COPY requirements.txt requirements.txt
|
20 |
+
|
21 |
+
# Install all other Python dependencies
|
22 |
+
RUN pip3 install --no-cache-dir -r requirements.txt
|
23 |
+
|
24 |
+
# Copy the rest of your application code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
COPY . .
|
26 |
|
27 |
+
# Make the start script executable
|
28 |
+
RUN chmod +x ./start.sh
|
29 |
|
30 |
+
# Run start.sh when the container launches
|
31 |
+
CMD ["/bin/bash", "./start.sh"]
|
requirements.txt
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
-
|
2 |
-
torchvision
|
3 |
accelerate==1.2.1
|
4 |
av==14.0.1
|
5 |
bitsandbytes==0.45.0
|
@@ -13,12 +12,5 @@ toml==0.10.2
|
|
13 |
tqdm==4.67.1
|
14 |
transformers==4.46.3
|
15 |
voluptuous==0.15.2
|
16 |
-
|
17 |
-
# Wan2.1
|
18 |
ftfy==6.3.1
|
19 |
-
easydict==1.13
|
20 |
-
|
21 |
-
# optional dependencies
|
22 |
-
# ascii-magic==2.3.0
|
23 |
-
# matplotlib==3.10.0
|
24 |
-
# tensorboard
|
|
|
1 |
+
# requirements.txt
|
|
|
2 |
accelerate==1.2.1
|
3 |
av==14.0.1
|
4 |
bitsandbytes==0.45.0
|
|
|
12 |
tqdm==4.67.1
|
13 |
transformers==4.46.3
|
14 |
voluptuous==0.15.2
|
|
|
|
|
15 |
ftfy==6.3.1
|
16 |
+
easydict==1.13
|
|
|
|
|
|
|
|
|
|