drrobot9 commited on
Commit
ab13f18
·
verified ·
1 Parent(s): fd9b3a8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -14
Dockerfile CHANGED
@@ -1,4 +1,3 @@
1
-
2
  FROM python:3.10-slim-bullseye
3
 
4
  ENV DEBIAN_FRONTEND=noninteractive \
@@ -12,8 +11,8 @@ ENV DEBIAN_FRONTEND=noninteractive \
12
  WORKDIR /code
13
 
14
 
15
-
16
  RUN apt-get update && apt-get install -y --no-install-recommends \
 
17
  libsndfile1 \
18
  ffmpeg \
19
  sox \
@@ -22,15 +21,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
22
  ca-certificates \
23
  && rm -rf /var/lib/apt/lists/*
24
 
25
-
26
-
27
  COPY requirements.txt .
28
- RUN pip install --upgrade pip \
29
- && pip install --no-cache-dir -r requirements.txt
30
 
31
 
 
32
 
33
- # Pre-download Model at BUILD TIME
34
 
35
  RUN python - <<EOF
36
  from huggingface_hub import snapshot_download
@@ -39,16 +34,11 @@ snapshot_download(
39
  local_dir="/opt/models/LiquidAI/LFM2.5-Audio-1.5B",
40
  local_dir_use_symlinks=False
41
  )
42
- print(" model downloaded successfully.")
43
  EOF
44
 
45
-
46
-
47
  COPY . .
48
 
49
-
50
  EXPOSE 7860
51
 
52
-
53
-
54
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.10-slim-bullseye
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive \
 
11
  WORKDIR /code
12
 
13
 
 
14
  RUN apt-get update && apt-get install -y --no-install-recommends \
15
+ git \
16
  libsndfile1 \
17
  ffmpeg \
18
  sox \
 
21
  ca-certificates \
22
  && rm -rf /var/lib/apt/lists/*
23
 
 
 
24
  COPY requirements.txt .
 
 
25
 
26
 
27
+ RUN pip install --no-cache-dir -r requirements.txt
28
 
 
29
 
30
  RUN python - <<EOF
31
  from huggingface_hub import snapshot_download
 
34
  local_dir="/opt/models/LiquidAI/LFM2.5-Audio-1.5B",
35
  local_dir_use_symlinks=False
36
  )
37
+ print("Model downloaded successfully.")
38
  EOF
39
 
 
 
40
  COPY . .
41
 
 
42
  EXPOSE 7860
43
 
44
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]