NitinBot001 commited on
Commit
c7c9999
·
verified ·
1 Parent(s): a2b09a4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -6
Dockerfile CHANGED
@@ -1,7 +1,11 @@
1
- # Use official Python image
2
  FROM python:3.10-slim
3
 
4
- # Install dependencies for ffmpeg and WhisperX
 
 
 
 
5
  RUN apt-get update && \
6
  apt-get install -y git ffmpeg libsndfile1 && \
7
  rm -rf /var/lib/apt/lists/*
@@ -9,15 +13,15 @@ RUN apt-get update && \
9
  # Set working directory
10
  WORKDIR /app
11
 
12
- # Copy requirements and install
13
  COPY requirements.txt .
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
- # Copy app code
17
  COPY . .
18
 
19
- # Expose port
20
  EXPOSE 7860
21
 
22
- # Run the FastAPI app
23
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Base image
2
  FROM python:3.10-slim
3
 
4
+ # Set environment variables to writable paths
5
+ ENV HF_HOME=/app/hf_cache
6
+ ENV MPLCONFIGDIR=/app/mpl_config
7
+
8
+ # Install OS packages
9
  RUN apt-get update && \
10
  apt-get install -y git ffmpeg libsndfile1 && \
11
  rm -rf /var/lib/apt/lists/*
 
13
  # Set working directory
14
  WORKDIR /app
15
 
16
+ # Copy dependency list and install
17
  COPY requirements.txt .
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
+ # Copy application code
21
  COPY . .
22
 
23
+ # Expose API port
24
  EXPOSE 7860
25
 
26
+ # Run FastAPI
27
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]