luciagomez commited on
Commit
9e2662d
·
verified ·
1 Parent(s): 6322780

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -9
Dockerfile CHANGED
@@ -1,5 +1,6 @@
1
  FROM python:3.10-slim
2
 
 
3
  WORKDIR /app
4
 
5
  # Install system dependencies
@@ -9,28 +10,26 @@ RUN apt-get update && \
9
  wget \
10
  curl \
11
  ca-certificates \
12
- gnupg \
13
  lsb-release \
14
- unzip \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
- # Upgrade pip
18
- RUN python -m pip install --upgrade pip
19
-
20
  # Install Python packages
21
- RUN pip install --no-cache-dir torch transformers accelerate huggingface_hub git-lfs
22
- RUN pip install --no-cache-dir -U "huggingface_hub[cli]"
23
 
24
- # Copy requirements and install
25
  COPY requirements.txt .
26
  RUN pip install --no-cache-dir -r requirements.txt
27
 
28
- # Copy app code
29
  COPY . /app
30
 
31
  # Expose port
32
  EXPOSE 7860
33
 
 
34
  CMD ["python", "app.py"]
35
 
36
 
 
 
1
  FROM python:3.10-slim
2
 
3
+ # Set working directory
4
  WORKDIR /app
5
 
6
  # Install system dependencies
 
10
  wget \
11
  curl \
12
  ca-certificates \
 
13
  lsb-release \
14
+ gnupg \
15
  && rm -rf /var/lib/apt/lists/*
16
 
 
 
 
17
  # Install Python packages
18
+ RUN pip install --upgrade pip
19
+ RUN pip install --no-cache-dir torch transformers accelerate huggingface_hub gradio
20
 
21
+ # Copy requirements first for caching
22
  COPY requirements.txt .
23
  RUN pip install --no-cache-dir -r requirements.txt
24
 
25
+ # Copy the rest of the app code
26
  COPY . /app
27
 
28
  # Expose port
29
  EXPOSE 7860
30
 
31
+ # Run app
32
  CMD ["python", "app.py"]
33
 
34
 
35
+