Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +11 -3
Dockerfile
CHANGED
|
@@ -5,12 +5,13 @@ ENV PYTHONDONTWRITEBYTECODE 1
|
|
| 5 |
ENV PYTHONUNBUFFERED 1
|
| 6 |
ENV HF_HOME=/data/hf_cache
|
| 7 |
ENV TRANSFORMERS_CACHE=/data/hf_cache/txagent_models
|
|
|
|
| 8 |
|
| 9 |
# Install system dependencies
|
| 10 |
RUN apt-get update && apt-get install -y \
|
| 11 |
-
python3
|
| 12 |
python3-pip \
|
| 13 |
-
python3
|
| 14 |
build-essential \
|
| 15 |
libpoppler-cpp-dev \
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
|
@@ -18,12 +19,19 @@ RUN apt-get update && apt-get install -y \
|
|
| 18 |
# Create and set working directory
|
| 19 |
WORKDIR /app
|
| 20 |
|
| 21 |
-
# Install specific versions of PyTorch and vLLM
|
| 22 |
RUN pip install --no-cache-dir \
|
| 23 |
torch==2.1.2+cu121 \
|
| 24 |
--extra-index-url https://download.pytorch.org/whl/cu121
|
| 25 |
RUN pip install --no-cache-dir vllm==0.3.0
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
# Copy requirements first to leverage Docker cache
|
| 28 |
COPY requirements.txt .
|
| 29 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 5 |
ENV PYTHONUNBUFFERED 1
|
| 6 |
ENV HF_HOME=/data/hf_cache
|
| 7 |
ENV TRANSFORMERS_CACHE=/data/hf_cache/txagent_models
|
| 8 |
+
ENV MPLCONFIGDIR=/tmp/matplotlib
|
| 9 |
|
| 10 |
# Install system dependencies
|
| 11 |
RUN apt-get update && apt-get install -y \
|
| 12 |
+
python3 \
|
| 13 |
python3-pip \
|
| 14 |
+
python3-dev \
|
| 15 |
build-essential \
|
| 16 |
libpoppler-cpp-dev \
|
| 17 |
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
| 19 |
# Create and set working directory
|
| 20 |
WORKDIR /app
|
| 21 |
|
| 22 |
+
# Install specific versions of PyTorch and vLLM with CUDA 12.1 support
|
| 23 |
RUN pip install --no-cache-dir \
|
| 24 |
torch==2.1.2+cu121 \
|
| 25 |
--extra-index-url https://download.pytorch.org/whl/cu121
|
| 26 |
RUN pip install --no-cache-dir vllm==0.3.0
|
| 27 |
|
| 28 |
+
# Create necessary directories
|
| 29 |
+
RUN mkdir -p /data/hf_cache/txagent_models \
|
| 30 |
+
/data/hf_cache/tool_cache \
|
| 31 |
+
/data/hf_cache/cache \
|
| 32 |
+
/data/hf_cache/reports \
|
| 33 |
+
/tmp/matplotlib
|
| 34 |
+
|
| 35 |
# Copy requirements first to leverage Docker cache
|
| 36 |
COPY requirements.txt .
|
| 37 |
RUN pip install --no-cache-dir -r requirements.txt
|