Kavin1701 commited on
Commit
c0b6148
·
verified ·
1 Parent(s): 084f96b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -3
Dockerfile CHANGED
@@ -5,11 +5,14 @@ WORKDIR /python-docker
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 pip3 install "git+https://github.com/openai/whisper.git"
9
  RUN apt-get update && apt-get install -y ffmpeg
10
 
 
 
 
 
11
  COPY . .
12
 
13
- EXPOSE 8000
14
 
15
- CMD ["uvicorn", "fastapi_app:app", "--host", "0.0.0.0", "--port", "8000"]
 
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"]