Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +12 -15
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
# Set environment variables
|
| 4 |
ENV PYTHONDONTWRITEBYTECODE 1
|
|
@@ -10,9 +10,7 @@ ENV MPLCONFIGDIR=/tmp/matplotlib
|
|
| 10 |
|
| 11 |
# Install system dependencies
|
| 12 |
RUN apt-get update && apt-get install -y \
|
| 13 |
-
|
| 14 |
-
python3-pip \
|
| 15 |
-
python3-dev \
|
| 16 |
build-essential \
|
| 17 |
libpoppler-cpp-dev \
|
| 18 |
&& rm -rf /var/lib/apt/lists/*
|
|
@@ -20,20 +18,19 @@ RUN apt-get update && apt-get install -y \
|
|
| 20 |
# Create and set working directory
|
| 21 |
WORKDIR /app
|
| 22 |
|
| 23 |
-
# Install base packages
|
| 24 |
-
RUN pip install --no-cache-dir packaging setuptools wheel
|
| 25 |
-
|
| 26 |
-
# Install PyTorch with CUDA 12.1 support
|
| 27 |
RUN pip install --no-cache-dir \
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
# Install
|
| 32 |
RUN pip install --no-cache-dir \
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
sentence-transformers
|
| 36 |
-
|
| 37 |
|
| 38 |
# Create necessary directories
|
| 39 |
RUN mkdir -p /data/hf_cache/txagent_models \
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
|
| 3 |
# Set environment variables
|
| 4 |
ENV PYTHONDONTWRITEBYTECODE 1
|
|
|
|
| 10 |
|
| 11 |
# Install system dependencies
|
| 12 |
RUN apt-get update && apt-get install -y \
|
| 13 |
+
git \
|
|
|
|
|
|
|
| 14 |
build-essential \
|
| 15 |
libpoppler-cpp-dev \
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
| 18 |
# Create and set working directory
|
| 19 |
WORKDIR /app
|
| 20 |
|
| 21 |
+
# Install base packages
|
|
|
|
|
|
|
|
|
|
| 22 |
RUN pip install --no-cache-dir \
|
| 23 |
+
packaging \
|
| 24 |
+
setuptools \
|
| 25 |
+
wheel \
|
| 26 |
+
numpy
|
| 27 |
|
| 28 |
+
# Install PyTorch with CUDA support (Hugging Face Spaces provides CUDA)
|
| 29 |
RUN pip install --no-cache-dir \
|
| 30 |
+
torch \
|
| 31 |
+
transformers \
|
| 32 |
+
sentence-transformers \
|
| 33 |
+
vllm
|
| 34 |
|
| 35 |
# Create necessary directories
|
| 36 |
RUN mkdir -p /data/hf_cache/txagent_models \
|