fixed error 11
Browse files- Dockerfile +13 -9
- requirements.txt +4 -9
Dockerfile
CHANGED
|
@@ -1,20 +1,24 @@
|
|
| 1 |
-
# Use a
|
|
|
|
| 2 |
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
|
| 3 |
|
| 4 |
-
# Install
|
|
|
|
|
|
|
| 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 |
-
#
|
| 11 |
-
|
|
|
|
| 12 |
|
| 13 |
-
#
|
| 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
|
| 18 |
|
| 19 |
# Copy the rest of your application code
|
| 20 |
COPY . .
|
|
|
|
| 1 |
+
# Use a base image with Python
|
| 2 |
+
# Use a CUDA devel image as the base
|
| 3 |
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
|
| 4 |
|
| 5 |
+
# Install git and other build tools
|
| 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 in the container
|
| 14 |
+
ENV CUDA_HOME=/usr/local/cuda
|
| 15 |
+
WORKDIR /app
|
| 16 |
|
| 17 |
+
# Copy the requirements file and install dependencies
|
|
|
|
| 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 . .
|
requirements.txt
CHANGED
|
@@ -1,15 +1,10 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 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 |
-
|
| 12 |
-
|
| 13 |
-
# Add networkx back with a pinned version to be safe
|
| 14 |
-
networkx==3.1
|
| 15 |
-
sympy
|
|
|
|
| 1 |
+
--extra-index-url https://download.pytorch.org/whl/cu121
|
| 2 |
+
torch==2.1.0
|
| 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 |
+
networkx>=2.0
|
| 10 |
+
sympy
|
|
|
|
|
|
|
|
|