fixed error 10
Browse files- Dockerfile +9 -13
- requirements.txt +9 -4
Dockerfile
CHANGED
|
@@ -1,24 +1,20 @@
|
|
| 1 |
-
# Use a
|
| 2 |
-
# Use a CUDA devel image as the base
|
| 3 |
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
|
| 4 |
|
| 5 |
-
# Install
|
| 6 |
-
# The specific command depends on the base image's package manager.
|
| 7 |
-
# For Debian/Ubuntu-based images like python:3.10-slim, it's apt-get.
|
| 8 |
RUN apt-get update && apt-get install -y python3 python3-pip git
|
| 9 |
-
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
| 10 |
-
RUN python3 -m pip install --upgrade pip
|
| 11 |
-
|
| 12 |
|
| 13 |
-
# Set the working directory
|
| 14 |
-
ENV CUDA_HOME=/usr/local/cuda
|
| 15 |
WORKDIR /app
|
| 16 |
|
| 17 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
COPY requirements.txt .
|
| 19 |
-
RUN pip install torch==2.3.0
|
| 20 |
RUN pip install --no-cache-dir --upgrade setuptools wheel packaging
|
| 21 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 22 |
|
| 23 |
# Copy the rest of your application code
|
| 24 |
COPY . .
|
|
|
|
| 1 |
+
# Use a CUDA devel image as the base, which includes the CUDA toolkit
|
|
|
|
| 2 |
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
|
| 3 |
|
| 4 |
+
# Install Python, pip, and other necessary tools
|
|
|
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y python3 python3-pip git
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
# Set the working directory for the app
|
|
|
|
| 8 |
WORKDIR /app
|
| 9 |
|
| 10 |
+
# Upgrade pip to the latest version to avoid conflicts
|
| 11 |
+
RUN python3 -m pip install --upgrade pip
|
| 12 |
+
|
| 13 |
+
# Now install dependencies from requirements.txt, including the extra URL
|
| 14 |
+
# This is the single, correct way to install all dependencies
|
| 15 |
COPY requirements.txt .
|
|
|
|
| 16 |
RUN pip install --no-cache-dir --upgrade setuptools wheel packaging
|
| 17 |
+
RUN pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cu121 -r requirements.txt
|
| 18 |
|
| 19 |
# Copy the rest of your application code
|
| 20 |
COPY . .
|
requirements.txt
CHANGED
|
@@ -1,10 +1,15 @@
|
|
| 1 |
-
--extra-index-url
|
| 2 |
-
|
| 3 |
flash-attn==2.8.3
|
|
|
|
|
|
|
| 4 |
transformers
|
| 5 |
unsloth[cu121-ampere-torch230] @ git+https://github.com/unslothai/unsloth.git@August-2025
|
| 6 |
streamlit
|
| 7 |
fastapi
|
| 8 |
uvicorn
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Remove --extra-index-url from here
|
| 2 |
+
packaging
|
| 3 |
flash-attn==2.8.3
|
| 4 |
+
# Use the torch version that unsloth expects
|
| 5 |
+
torch==2.3.0
|
| 6 |
transformers
|
| 7 |
unsloth[cu121-ampere-torch230] @ git+https://github.com/unslothai/unsloth.git@August-2025
|
| 8 |
streamlit
|
| 9 |
fastapi
|
| 10 |
uvicorn
|
| 11 |
+
# Pin tqdm to a specific version to avoid conflicts
|
| 12 |
+
tqdm==4.66.6
|
| 13 |
+
# Add networkx back with a pinned version to be safe
|
| 14 |
+
networkx==3.1
|
| 15 |
+
sympy
|