Princeaka commited on
Commit
9ac5a6c
·
verified ·
1 Parent(s): b278e6f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -7
Dockerfile CHANGED
@@ -1,20 +1,22 @@
1
  FROM python:3.9-slim
2
 
3
- # Install system dependencies
4
  RUN apt-get update && apt-get install -y \
5
  ffmpeg \
6
  libsm6 \
7
  libxext6 \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
- # Set working directory
11
  WORKDIR /app
12
 
13
- # Copy files
14
- COPY . .
 
 
 
 
15
 
16
- # Install Python dependencies
17
- RUN chmod +x install.sh && ./install.sh
18
 
19
- # Start server
20
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.9-slim
2
 
3
+ # Install system deps
4
  RUN apt-get update && apt-get install -y \
5
  ffmpeg \
6
  libsm6 \
7
  libxext6 \
8
  && rm -rf /var/lib/apt/lists/*
9
 
 
10
  WORKDIR /app
11
 
12
+ # Copy only requirements first for caching
13
+ COPY requirements.txt .
14
+
15
+ # Force huggingface-hub to install first
16
+ RUN pip install --no-cache-dir huggingface-hub==0.13.4
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
 
19
+ # Copy rest of the app
20
+ COPY . .
21
 
 
22
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]