TGPro1 commited on
Commit
71d9636
·
verified ·
1 Parent(s): 94921a4

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +38 -0
Dockerfile ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM pytorch/pytorch:2.1.2-cuda11.8-cudnn8-runtime
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
7
+ ffmpeg \
8
+ libsndfile1 \
9
+ git \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Install Python dependencies
13
+ RUN pip install --no-cache-dir \
14
+ transformers==4.38.1 \
15
+ openai-whisper \
16
+ TTS \
17
+ fastapi \
18
+ uvicorn[standard] \
19
+ requests \
20
+ sentencepiece \
21
+ sacremoses \
22
+ huggingface-hub \
23
+ protobuf \
24
+ accelerate \
25
+ pydantic
26
+
27
+ # Copy application
28
+ COPY hf_app.py /app/app.py
29
+
30
+ # Set environment
31
+ ENV COQUI_TOS_AGREED=1
32
+ ENV PYTHONUNBUFFERED=1
33
+
34
+ # Expose port
35
+ EXPOSE 7860
36
+
37
+ # Run application
38
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]