TGPro1 commited on
Commit
9d39d1d
·
verified ·
1 Parent(s): f1cc872

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -21
Dockerfile CHANGED
@@ -10,34 +10,21 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
  # Install Python dependencies
13
- RUN pip install --no-cache-dir \
14
- faster-whisper \
15
- deep-translator \
16
- transformers \
17
- coqui-tts \
18
- fastapi \
19
- uvicorn[standard] \
20
- requests \
21
- sentencepiece \
22
- sacremoses \
23
- huggingface-hub \
24
- protobuf \
25
- accelerate \
26
- torch \
27
- torchaudio \
28
- deepfilternet \
29
- soundfile \
30
- pydantic
31
 
32
- # Copy application
33
- COPY hf_app.py /app/app.py
34
 
35
  # Set environment
36
  ENV COQUI_TOS_AGREED=1
37
  ENV PYTHONUNBUFFERED=1
 
 
38
 
39
  # Expose port
40
  EXPOSE 7860
41
 
42
  # Run application
43
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
  # Install Python dependencies
13
+ COPY requirements.txt .
14
+ RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
+ # Copy application files
17
+ COPY . .
18
 
19
  # Set environment
20
  ENV COQUI_TOS_AGREED=1
21
  ENV PYTHONUNBUFFERED=1
22
+ ENV GRADIO_SERVER_NAME="0.0.0.0"
23
+ ENV GRADIO_SERVER_PORT=7860
24
 
25
  # Expose port
26
  EXPOSE 7860
27
 
28
  # Run application
29
+ # Using python directly to trigger the __main__ block and warmup
30
+ CMD ["python", "app.py"]