Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +14 -7
Dockerfile
CHANGED
@@ -1,30 +1,37 @@
|
|
1 |
FROM python:3.8-slim
|
2 |
|
3 |
-
#
|
4 |
ENV PYTHONUNBUFFERED=1 \
|
5 |
DEBIAN_FRONTEND=noninteractive \
|
6 |
PIP_NO_CACHE_DIR=1
|
7 |
|
8 |
-
#
|
9 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
10 |
build-essential \
|
11 |
libopenblas-dev \
|
12 |
git \
|
13 |
curl \
|
14 |
cmake \
|
|
|
|
|
15 |
&& rm -rf /var/lib/apt/lists/*
|
16 |
|
17 |
-
#
|
18 |
COPY requirements.txt .
|
19 |
RUN pip install --upgrade pip setuptools wheel && \
|
20 |
pip install torch==2.2.1 --index-url https://download.pytorch.org/whl/cpu && \
|
21 |
-
pip install
|
22 |
-
pip install
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
WORKDIR /app
|
25 |
COPY . /app
|
26 |
-
|
27 |
-
# 4. Create necessary directories
|
28 |
RUN mkdir -p /app/checkpoints /app/logs
|
29 |
|
30 |
CMD ["python", "train.py"]
|
|
|
1 |
FROM python:3.8-slim
|
2 |
|
3 |
+
# Set environment variables
|
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 |
libopenblas-dev \
|
12 |
git \
|
13 |
curl \
|
14 |
cmake \
|
15 |
+
g++ \
|
16 |
+
make \
|
17 |
&& rm -rf /var/lib/apt/lists/*
|
18 |
|
19 |
+
# Install Python packages in optimal order
|
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
|
34 |
COPY . /app
|
|
|
|
|
35 |
RUN mkdir -p /app/checkpoints /app/logs
|
36 |
|
37 |
CMD ["python", "train.py"]
|