Grinding commited on
Commit
45e5e76
·
verified ·
1 Parent(s): c8f4901

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -2
Dockerfile CHANGED
@@ -1,7 +1,17 @@
1
- # The Dockerfile is nearly identical to the ASR service [cite: 235]
2
  FROM python:3.9-slim
 
3
  WORKDIR /code
 
4
  COPY ./requirements.txt /code/requirements.txt
5
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
 
 
 
 
 
 
 
6
  COPY ./app.py /code/app.py
7
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
1
  FROM python:3.9-slim
2
+
3
  WORKDIR /code
4
+
5
  COPY ./requirements.txt /code/requirements.txt
6
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
7
+
8
+ ENV TRANSFORMERS_CACHE=/code/hf_cache
9
+ RUN mkdir -p /code/hf_cache && chmod -R 777 /code/hf_cache
10
+
11
+ # Pre-download summarization model
12
+ RUN python -c "from transformers import pipeline; pipeline('summarization', model='knkarthick/MEETING_SUMMARY')"
13
+
14
  COPY ./app.py /code/app.py
15
+
16
+ EXPOSE 7860
17
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]