drrobot9 commited on
Commit
22f2c53
·
verified ·
1 Parent(s): c4caed0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -1
Dockerfile CHANGED
@@ -5,11 +5,45 @@ ENV PYTHONUNBUFFERED=1
5
 
6
  WORKDIR /app
7
 
 
 
 
 
 
 
 
 
 
 
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  COPY app ./app
12
 
13
  EXPOSE 7860
14
 
15
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
5
 
6
  WORKDIR /app
7
 
8
+
9
+ RUN apt-get update && apt-get install -y --no-install-recommends \
10
+ git \
11
+ wget \
12
+ curl \
13
+ libsndfile1 \
14
+ ffmpeg \
15
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
16
+
17
+
18
  COPY requirements.txt .
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
+
22
+ RUN pip install --no-cache-dir \
23
+ "yarngpt @ git+https://github.com/saheedniyi02/yarngpt.git"
24
+
25
+ RUN wget -q \
26
+ https://huggingface.co/novateur/WavTokenizer-medium-speech-75token/resolve/main/wavtokenizer_mediumdata_frame75_3s_nq1_code4096_dim512_kmeans200_attn.yaml \
27
+ -O /app/wavtokenizer_config.yaml
28
+
29
+
30
+ RUN python3 -c "\
31
+ from huggingface_hub import hf_hub_download; \
32
+ hf_hub_download( \
33
+ repo_id='novateur/WavTokenizer-medium-speech-75token', \
34
+ filename='wavtokenizer_large_speech_320_24k.ckpt', \
35
+ local_dir='/app' \
36
+ )"
37
+
38
+
39
+ ENV MODEL_ID="saheedniyi/YarnGPT2b"
40
+ ENV WAV_TOKENIZER_CONFIG="/app/wavtokenizer_config.yaml"
41
+ ENV WAV_TOKENIZER_CKPT="/app/wavtokenizer_large_speech_320_24k.ckpt"
42
+ ENV HF_HOME="/app/.cache/huggingface"
43
+
44
+
45
  COPY app ./app
46
 
47
  EXPOSE 7860
48
 
49
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1", "--timeout-keep-alive", "300"]