Yermek68 commited on
Commit
c5b5346
·
verified ·
1 Parent(s): 0588625

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -13
Dockerfile CHANGED
@@ -1,21 +1,17 @@
1
  FROM python:3.10-slim
2
 
3
  WORKDIR /app
 
 
 
 
4
 
5
- RUN apt-get update && apt-get install -y \
6
- git git-lfs ffmpeg libsndfile1 cmake libglib2.0-0 \
7
- && rm -rf /var/lib/apt/lists/*
8
 
9
- COPY requirements.txt .
 
10
 
11
- RUN pip install --no-cache-dir huggingface-hub==0.23.4 transformers==4.46.0
12
- RUN pip install --no-cache-dir -r requirements.txt --no-deps
13
-
14
- COPY app.py ./
15
- COPY Eroha_*.md ./
16
-
17
- ENV HF_HUB_DISABLE_TELEMETRY=1
18
- ENV TRANSFORMERS_VERBOSITY=info
19
  EXPOSE 7860
20
 
21
- CMD ["python", "app.py"]
 
1
  FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
+ ENV PYTHONUNBUFFERED=1 \
5
+ HF_HOME=/tmp/huggingface \
6
+ TRANSFORMERS_CACHE=/tmp/huggingface \
7
+ PORT=7860
8
 
9
+ RUN apt-get update && apt-get install -y git git-lfs ffmpeg libgl1 && git lfs install && rm -rf /var/lib/apt/lists/*
 
 
10
 
11
+ COPY requirements.txt /app/
12
+ RUN pip install --no-cache-dir -U pip setuptools wheel && pip install --no-cache-dir -r requirements.txt
13
 
14
+ COPY app.py /app/
 
 
 
 
 
 
 
15
  EXPOSE 7860
16
 
17
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]