Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +23 -11
Dockerfile
CHANGED
|
@@ -1,33 +1,45 @@
|
|
| 1 |
-
FROM python:3.8-
|
| 2 |
|
| 3 |
-
# Set environment
|
| 4 |
ENV PYTHONUNBUFFERED=1 \
|
| 5 |
DEBIAN_FRONTEND=noninteractive \
|
| 6 |
-
PIP_NO_CACHE_DIR=1
|
|
|
|
| 7 |
|
| 8 |
-
# Install system dependencies
|
| 9 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 10 |
build-essential \
|
| 11 |
-
|
| 12 |
git \
|
| 13 |
curl \
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
&& rm -rf /var/lib/apt/lists/*
|
| 18 |
|
| 19 |
-
# Install Python packages
|
| 20 |
COPY requirements.txt .
|
| 21 |
RUN pip install --upgrade pip setuptools wheel && \
|
| 22 |
pip install torch==2.2.1 --index-url https://download.pytorch.org/whl/cpu && \
|
| 23 |
pip install ninja==1.11.1 && \
|
| 24 |
pip install transformers==4.38.2 && \
|
| 25 |
pip install accelerate==0.27.2 && \
|
| 26 |
-
pip install deepspeed==0.13.1 && \
|
| 27 |
pip install datasets==2.18.0 && \
|
| 28 |
pip install huggingface_hub==0.20.3 && \
|
|
|
|
| 29 |
pip install unsloth==0.2.0 && \
|
| 30 |
-
pip install vllm==0.3.0 --no-deps && \
|
| 31 |
pip install fastapi==0.109.1 uvicorn==0.27.0
|
| 32 |
|
| 33 |
WORKDIR /app
|
|
|
|
| 1 |
+
FROM python:3.8-bullseye # Using full Debian image for better compatibility
|
| 2 |
|
| 3 |
+
# Set up environment
|
| 4 |
ENV PYTHONUNBUFFERED=1 \
|
| 5 |
DEBIAN_FRONTEND=noninteractive \
|
| 6 |
+
PIP_NO_CACHE_DIR=1 \
|
| 7 |
+
PIP_DISABLE_PIP_VERSION_CHECK=1
|
| 8 |
|
| 9 |
+
# Install system dependencies - expanded set
|
| 10 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 11 |
build-essential \
|
| 12 |
+
cmake \
|
| 13 |
git \
|
| 14 |
curl \
|
| 15 |
+
wget \
|
| 16 |
+
libopenblas-dev \
|
| 17 |
+
libssl-dev \
|
| 18 |
+
zlib1g-dev \
|
| 19 |
+
libbz2-dev \
|
| 20 |
+
libreadline-dev \
|
| 21 |
+
libsqlite3-dev \
|
| 22 |
+
llvm \
|
| 23 |
+
libncurses5-dev \
|
| 24 |
+
libncursesw5-dev \
|
| 25 |
+
xz-utils \
|
| 26 |
+
tk-dev \
|
| 27 |
+
libffi-dev \
|
| 28 |
+
liblzma-dev \
|
| 29 |
&& rm -rf /var/lib/apt/lists/*
|
| 30 |
|
| 31 |
+
# Install Python packages with precise order and fallbacks
|
| 32 |
COPY requirements.txt .
|
| 33 |
RUN pip install --upgrade pip setuptools wheel && \
|
| 34 |
pip install torch==2.2.1 --index-url https://download.pytorch.org/whl/cpu && \
|
| 35 |
pip install ninja==1.11.1 && \
|
| 36 |
pip install transformers==4.38.2 && \
|
| 37 |
pip install accelerate==0.27.2 && \
|
|
|
|
| 38 |
pip install datasets==2.18.0 && \
|
| 39 |
pip install huggingface_hub==0.20.3 && \
|
| 40 |
+
{ pip install deepspeed==0.13.1 || pip install deepspeed==0.13.1 --no-deps; } && \
|
| 41 |
pip install unsloth==0.2.0 && \
|
| 42 |
+
{ pip install vllm==0.3.0 || pip install vllm==0.3.0 --no-deps; } && \
|
| 43 |
pip install fastapi==0.109.1 uvicorn==0.27.0
|
| 44 |
|
| 45 |
WORKDIR /app
|