Ala404 commited on
Commit
64c8783
·
verified ·
1 Parent(s): dbb52ad

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -5
Dockerfile CHANGED
@@ -1,5 +1,6 @@
1
  FROM python:3.9-slim
2
 
 
3
  RUN apt-get update && apt-get install -y \
4
  ffmpeg \
5
  libsndfile1 \
@@ -8,17 +9,21 @@ RUN apt-get update && apt-get install -y \
8
  # Set working directory
9
  WORKDIR /app
10
 
11
- # Set HF_HOME
12
  ENV HF_HOME=/app/.cache/huggingface
 
13
 
14
- # Create cache directory and set permissions
15
- RUN mkdir -p /app/.cache/huggingface && chmod 777 /app/.cache/huggingface
16
-
17
  COPY requirements.txt .
 
 
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
 
20
  COPY app.py .
21
 
 
22
  EXPOSE 7860
23
 
24
- CMD ["python", "app.py"]
 
 
1
  FROM python:3.9-slim
2
 
3
+ # Install system dependencies
4
  RUN apt-get update && apt-get install -y \
5
  ffmpeg \
6
  libsndfile1 \
 
9
  # Set working directory
10
  WORKDIR /app
11
 
12
+ # Set HF_HOME and create cache directory with permissive permissions
13
  ENV HF_HOME=/app/.cache/huggingface
14
+ RUN mkdir -p /EAD0 /app/.cache/huggingface && chmod -R 777 /app/.cache/huggingface
15
 
16
+ # Copy requirements first for better caching
 
 
17
  COPY requirements.txt .
18
+
19
+ # Install Python dependencies
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
22
+ # Copy application code
23
  COPY app.py .
24
 
25
+ # Expose port
26
  EXPOSE 7860
27
 
28
+ # Run the application with uvicorn
29
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]