Update Dockerfile
Browse files- Dockerfile +7 -4
Dockerfile
CHANGED
@@ -20,17 +20,20 @@ RUN apt-get update && apt-get install -y \
|
|
20 |
# Create and set working directory
|
21 |
WORKDIR /app
|
22 |
|
23 |
-
# Install
|
|
|
|
|
|
|
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
|
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 \
|
@@ -49,5 +52,5 @@ COPY . .
|
|
49 |
# Expose port
|
50 |
EXPOSE 7860
|
51 |
|
52 |
-
# Command to run the application
|
53 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
20 |
# Create and set working directory
|
21 |
WORKDIR /app
|
22 |
|
23 |
+
# Install base packages first
|
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 |
torch==2.1.2+cu121 \
|
29 |
--extra-index-url https://download.pytorch.org/whl/cu121
|
30 |
|
31 |
+
# Install vLLM and other packages in optimal order
|
32 |
RUN pip install --no-cache-dir \
|
33 |
vllm==0.3.0 \
|
34 |
xformers==0.0.22.post7 \
|
35 |
sentence-transformers==2.2.2 \
|
36 |
+
flash-attn==2.3.3 --no-build-isolation
|
37 |
|
38 |
# Create necessary directories
|
39 |
RUN mkdir -p /data/hf_cache/txagent_models \
|
|
|
52 |
# Expose port
|
53 |
EXPOSE 7860
|
54 |
|
55 |
+
# Command to run the application
|
56 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|