Ali2206 commited on
Commit
90ab911
·
verified ·
1 Parent(s): ce74c4f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -15
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM nvidia/cuda:12.1.1-base-ubuntu22.04
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
- python3 \
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 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 \
 
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 \