Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +14 -2
Dockerfile
CHANGED
|
@@ -20,6 +20,18 @@ RUN apt-get update && apt-get install -y \
|
|
| 20 |
# Create and set working directory
|
| 21 |
WORKDIR /app
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
# Create necessary directories
|
| 24 |
RUN mkdir -p /data/hf_cache/txagent_models \
|
| 25 |
/data/hf_cache/tool_cache \
|
|
@@ -27,7 +39,7 @@ RUN mkdir -p /data/hf_cache/txagent_models \
|
|
| 27 |
/data/hf_cache/reports \
|
| 28 |
/tmp/matplotlib
|
| 29 |
|
| 30 |
-
#
|
| 31 |
COPY requirements.txt .
|
| 32 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 33 |
|
|
@@ -37,5 +49,5 @@ COPY . .
|
|
| 37 |
# Expose port
|
| 38 |
EXPOSE 7860
|
| 39 |
|
| 40 |
-
# Command to run the application
|
| 41 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 20 |
# Create and set working directory
|
| 21 |
WORKDIR /app
|
| 22 |
|
| 23 |
+
# Install specific versions compatible with A100 and CUDA 12.1
|
| 24 |
+
RUN pip install --no-cache-dir \
|
| 25 |
+
torch==2.1.2+cu121 \
|
| 26 |
+
--extra-index-url https://download.pytorch.org/whl/cu121
|
| 27 |
+
|
| 28 |
+
# Install optimized vLLM for A100
|
| 29 |
+
RUN pip install --no-cache-dir \
|
| 30 |
+
vllm==0.3.0 \
|
| 31 |
+
xformers==0.0.22.post7 \
|
| 32 |
+
sentence-transformers==2.2.2 \
|
| 33 |
+
flash-attn==2.3.3
|
| 34 |
+
|
| 35 |
# Create necessary directories
|
| 36 |
RUN mkdir -p /data/hf_cache/txagent_models \
|
| 37 |
/data/hf_cache/tool_cache \
|
|
|
|
| 39 |
/data/hf_cache/reports \
|
| 40 |
/tmp/matplotlib
|
| 41 |
|
| 42 |
+
# Copy requirements first to leverage Docker cache
|
| 43 |
COPY requirements.txt .
|
| 44 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 45 |
|
|
|
|
| 49 |
# Expose port
|
| 50 |
EXPOSE 7860
|
| 51 |
|
| 52 |
+
# Command to run the application with optimal settings for A100
|
| 53 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|