CamiloVega commited on
Commit
d0f4bec
·
verified ·
1 Parent(s): 0d5e7ff

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -7
Dockerfile CHANGED
@@ -1,20 +1,21 @@
1
- FROM huggingface/transformers-pytorch-gpu:latest
2
 
3
  WORKDIR /app
4
 
5
  # Install system dependencies
6
  RUN apt-get update && apt-get install -y \
7
- python3-dev \
8
  build-essential \
9
  git \
 
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # Copy requirements first to leverage Docker cache
13
- COPY requirements.txt .
 
14
 
15
- # Upgrade pip and install requirements
16
- RUN pip install --no-cache-dir -U pip && \
17
- pip install --no-cache-dir -r requirements.txt
18
 
19
  # Copy the rest of the application
20
  COPY . .
 
1
+ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
5
  # Install system dependencies
6
  RUN apt-get update && apt-get install -y \
 
7
  build-essential \
8
  git \
9
+ python3-dev \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Upgrade pip and install basic requirements
13
+ RUN pip install --no-cache-dir --upgrade pip && \
14
+ pip install --no-cache-dir torch transformers accelerate safetensors
15
 
16
+ # Copy and install requirements
17
+ COPY requirements.txt .
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
 
20
  # Copy the rest of the application
21
  COPY . .