jisaacso219 commited on
Commit
aa15668
·
verified ·
1 Parent(s): fb07654

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -15
Dockerfile CHANGED
@@ -1,28 +1,24 @@
1
- # Base Python image
2
  FROM python:3.10-slim
3
 
4
- # Set environment vars
5
- ENV NUMBA_CACHE_DIR=/tmp/numba_cache \
6
- PYTHONUNBUFFERED=1 \
7
- HF_HUB_DISABLE_SYMLINKS_WARNING=1
8
-
9
  # Install system dependencies
10
- RUN apt-get update && apt-get install -y \
11
- ffmpeg libsndfile1 libgl1 git \
12
- && apt-get clean
 
 
13
 
14
- # Set workdir
15
  WORKDIR /app
16
 
17
- # Copy all app files
18
- COPY . .
19
 
20
  # Install Python dependencies
21
- RUN pip install --upgrade pip && \
22
- pip install -r requirements.txt
23
 
24
  # Expose port
25
  EXPOSE 7860
26
 
27
- # Run Flask app
28
  CMD ["python", "app.py"]
 
 
1
  FROM python:3.10-slim
2
 
 
 
 
 
 
3
  # Install system dependencies
4
+ RUN apt-get update && apt-get install -y git ffmpeg libsndfile1 && apt-get clean
5
+
6
+ # Set Hugging Face cache to a writable location
7
+ ENV TRANSFORMERS_CACHE=/tmp/hf_cache
8
+ ENV HF_HOME=/tmp/hf_home
9
 
10
+ # Set working directory
11
  WORKDIR /app
12
 
13
+ # Copy files
14
+ COPY . /app
15
 
16
  # Install Python dependencies
17
+ RUN pip install --upgrade pip
18
+ RUN pip install -r requirements.txt
19
 
20
  # Expose port
21
  EXPOSE 7860
22
 
23
+ # Run app
24
  CMD ["python", "app.py"]