Grinding commited on
Commit
6a01846
·
verified ·
1 Parent(s): 412c0e4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -8
Dockerfile CHANGED
@@ -1,24 +1,23 @@
1
  # Use an official Python runtime as a parent image
2
  FROM python:3.9-slim
3
 
4
- # --- FIX: Set a writable cache directory for the numba library ---
5
  ENV NUMBA_CACHE_DIR=/tmp
6
 
7
- # Install ffmpeg, a required system-level dependency for pydub
8
  RUN apt-get update && apt-get install -y ffmpeg
9
 
10
- # Set the working directory in the container
11
  WORKDIR /code
12
 
13
- # Copy the dependencies file to the working directory
14
  COPY ./requirements.txt /code/requirements.txt
15
 
16
- # Install any needed packages specified in requirements.txt
17
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
18
 
19
- # Copy the content of the local src directory to the working directory
20
  COPY ./app /code/app
21
 
22
- # Command to run the application
23
- # The port must be 10000 for Hugging Face Spaces
24
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "10000"]
 
1
  # Use an official Python runtime as a parent image
2
  FROM python:3.9-slim
3
 
4
+ # Set a writable cache directory for the numba library
5
  ENV NUMBA_CACHE_DIR=/tmp
6
 
7
+ # Install ffmpeg
8
  RUN apt-get update && apt-get install -y ffmpeg
9
 
10
+ # Set the working directory
11
  WORKDIR /code
12
 
13
+ # Copy requirements
14
  COPY ./requirements.txt /code/requirements.txt
15
 
16
+ # Install packages
17
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
18
 
19
+ # Copy app
20
  COPY ./app /code/app
21
 
22
+ # Run the application
 
23
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "10000"]