jay208 commited on
Commit
4b4a9dc
·
1 Parent(s): 5c059d3
Files changed (2) hide show
  1. Dockerfile +2 -11
  2. requirements.txt +10 -15
Dockerfile CHANGED
@@ -9,28 +9,19 @@ RUN apt-get update && apt-get install -y \
9
  git \
10
  wget \
11
  curl \
12
- libglib2.0-0 \
13
- libsm6 \
14
- libxext6 \
15
- libxrender-dev \
16
- libgomp1 \
17
- libglib2.0-0 \
18
- libgl1-mesa-glx \
19
  && rm -rf /var/lib/apt/lists/*
20
 
21
  # Copy requirements first to leverage Docker cache
22
  COPY requirements.txt .
23
 
24
- # Install Python dependencies
25
  RUN pip install --no-cache-dir --upgrade pip && \
 
26
  pip install --no-cache-dir -r requirements.txt
27
 
28
  # Copy application code
29
  COPY . .
30
 
31
- # Create necessary directories
32
- RUN mkdir -p /app/checkpoints /app/temp
33
-
34
  # Set environment variables
35
  ENV PYTHONPATH=/app
36
  ENV TORCH_HOME=/tmp/torch
 
9
  git \
10
  wget \
11
  curl \
 
 
 
 
 
 
 
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
  # Copy requirements first to leverage Docker cache
15
  COPY requirements.txt .
16
 
17
+ # Install Python dependencies (CPU-only PyTorch)
18
  RUN pip install --no-cache-dir --upgrade pip && \
19
+ pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu && \
20
  pip install --no-cache-dir -r requirements.txt
21
 
22
  # Copy application code
23
  COPY . .
24
 
 
 
 
25
  # Set environment variables
26
  ENV PYTHONPATH=/app
27
  ENV TORCH_HOME=/tmp/torch
requirements.txt CHANGED
@@ -1,15 +1,10 @@
1
- fastapi==0.104.1
2
- uvicorn[standard]==0.24.0
3
- transformers==4.36.0
4
- torch==2.1.0+cpu
5
- torchvision==0.16.0+cpu
6
- opencv-python-headless==4.8.1.78
7
- Pillow==10.1.0
8
- numpy==1.24.3
9
- huggingface-hub==0.19.4
10
- timm==0.9.12
11
- matplotlib==3.8.2
12
- requests==2.31.0
13
- python-multipart==0.0.6
14
- accelerate
15
- python-multipart
 
1
+ fastapi
2
+ uvicorn[standard]
3
+ transformers
4
+ opencv-python-headless
5
+ Pillow
6
+ numpy
7
+ huggingface-hub
8
+ requests
9
+ python-multipart
10
+ accelerate