Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +14 -5
Dockerfile
CHANGED
|
@@ -13,19 +13,28 @@ ENV HOME=/home/user \
|
|
| 13 |
PATH=/home/user/.local/bin:$PATH
|
| 14 |
WORKDIR $HOME/app
|
| 15 |
|
| 16 |
-
# 1. Install
|
| 17 |
-
#
|
| 18 |
RUN pip install --no-cache-dir \
|
| 19 |
"torch==2.5.0" \
|
|
|
|
|
|
|
| 20 |
"triton==3.1.0" \
|
| 21 |
"xformers==0.0.28.post2" \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
"transformers>=4.46.0" \
|
| 23 |
"trl>=0.12.0" \
|
| 24 |
"datasets" \
|
| 25 |
"huggingface_hub" \
|
|
|
|
|
|
|
| 26 |
--extra-index-url https://download.pytorch.org/whl/cu121
|
| 27 |
|
| 28 |
-
# 2. Install Unsloth components
|
| 29 |
RUN pip install --no-cache-dir \
|
| 30 |
"unsloth_zoo @ git+https://github.com/unslothai/unsloth-zoo.git" \
|
| 31 |
"unsloth @ git+https://github.com/unslothai/unsloth.git"
|
|
@@ -33,11 +42,11 @@ RUN pip install --no-cache-dir \
|
|
| 33 |
# 3. CRITICAL: Uninstall torchao completely to bypass the 'int1' bug
|
| 34 |
RUN pip uninstall -y torchao
|
| 35 |
|
| 36 |
-
# 4. Install Gradio and
|
| 37 |
COPY --chown=user requirements.txt $HOME/app/requirements.txt
|
| 38 |
RUN pip install --no-cache-dir -r $HOME/app/requirements.txt
|
| 39 |
|
| 40 |
-
# Copy
|
| 41 |
COPY --chown=user . $HOME/app
|
| 42 |
|
| 43 |
# Expose port
|
|
|
|
| 13 |
PATH=/home/user/.local/bin:$PATH
|
| 14 |
WORKDIR $HOME/app
|
| 15 |
|
| 16 |
+
# 1. Install the entire "Gold Standard" ML stack in one go.
|
| 17 |
+
# This includes all vision/audio/quantization/acceleration tools to prevent ANY further 'ModuleNotFound' errors.
|
| 18 |
RUN pip install --no-cache-dir \
|
| 19 |
"torch==2.5.0" \
|
| 20 |
+
"torchvision==0.20.0" \
|
| 21 |
+
"torchaudio==2.5.0" \
|
| 22 |
"triton==3.1.0" \
|
| 23 |
"xformers==0.0.28.post2" \
|
| 24 |
+
"accelerate" \
|
| 25 |
+
"peft" \
|
| 26 |
+
"bitsandbytes" \
|
| 27 |
+
"sentencepiece" \
|
| 28 |
+
"protobuf" \
|
| 29 |
"transformers>=4.46.0" \
|
| 30 |
"trl>=0.12.0" \
|
| 31 |
"datasets" \
|
| 32 |
"huggingface_hub" \
|
| 33 |
+
"matplotlib" \
|
| 34 |
+
"scipy" \
|
| 35 |
--extra-index-url https://download.pytorch.org/whl/cu121
|
| 36 |
|
| 37 |
+
# 2. Install Unsloth components (must be after torch stack)
|
| 38 |
RUN pip install --no-cache-dir \
|
| 39 |
"unsloth_zoo @ git+https://github.com/unslothai/unsloth-zoo.git" \
|
| 40 |
"unsloth @ git+https://github.com/unslothai/unsloth.git"
|
|
|
|
| 42 |
# 3. CRITICAL: Uninstall torchao completely to bypass the 'int1' bug
|
| 43 |
RUN pip uninstall -y torchao
|
| 44 |
|
| 45 |
+
# 4. Install Gradio and remaining UI needs
|
| 46 |
COPY --chown=user requirements.txt $HOME/app/requirements.txt
|
| 47 |
RUN pip install --no-cache-dir -r $HOME/app/requirements.txt
|
| 48 |
|
| 49 |
+
# Copy application files
|
| 50 |
COPY --chown=user . $HOME/app
|
| 51 |
|
| 52 |
# Expose port
|