Kavin1701 commited on
Commit
363ecca
·
verified ·
1 Parent(s): c0b6148

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -10
Dockerfile CHANGED
@@ -1,18 +1,19 @@
1
  FROM python:3.10
2
 
3
- WORKDIR /python-docker
 
4
 
 
5
  COPY requirements.txt requirements.txt
6
- RUN apt-get update && apt-get install git -y
7
- RUN pip3 install -r requirements.txt
8
- RUN apt-get update && apt-get install -y ffmpeg
9
 
10
- # Set environment variable for cache directory
11
- ENV XDG_CACHE_HOME=/python-docker/.cache
12
-
13
- RUN python -c "from transformers import pipeline; pipeline('automatic-speech-recognition', model='openai/whisper-small')"
14
  COPY . .
15
 
16
- EXPOSE 8001
 
17
 
18
- CMD ["uvicorn", "fastapi_app:app", "--host", "0.0.0.0", "--port", "8001"]
 
 
1
  FROM python:3.10
2
 
3
+ # Set the working directory
4
+ WORKDIR /app
5
 
6
+ # Copy the requirements file and install dependencies
7
  COPY requirements.txt requirements.txt
8
+ RUN apt-get update && apt-get install -y git ffmpeg
9
+ RUN pip install --no-cache-dir -r requirements.txt
10
+ RUN pip install --no-cache-dir "git+https://github.com/openai/whisper.git"
11
 
12
+ # Copy the entire application
 
 
 
13
  COPY . .
14
 
15
+ # Expose the necessary port
16
+ EXPOSE 7860
17
 
18
+ # Set the entry point for Hugging Face Spaces
19
+ CMD ["python", "fastapi_app.py"]