basyx commited on
Commit
d7c04ff
·
verified ·
1 Parent(s): c592441

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -23
Dockerfile CHANGED
@@ -1,39 +1,21 @@
1
- FROM python:3.10
2
 
3
- ENV PYTHONUNBUFFERED=1
4
  WORKDIR /app
5
 
6
- # ------------------------------------------------
7
- # SYSTEM DEPENDENCIES
8
- # ------------------------------------------------
9
  RUN apt-get update && apt-get install -y \
10
- ffmpeg \
11
  git \
12
- curl \
13
  libsndfile1 \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
- # ------------------------------------------------
17
- # PYTHON
18
- # ------------------------------------------------
19
  COPY requirements.txt .
20
 
21
- RUN pip install --upgrade pip setuptools wheel
22
-
23
- # Torch CPU build (HF safe)
24
- RUN pip install torch torchaudio \
25
- --index-url https://download.pytorch.org/whl/cpu
26
-
27
- # Install app requirements FIRST
28
  RUN pip install --no-cache-dir -r requirements.txt
29
 
30
- # ⭐ Install audiocraft WITHOUT dependencies
31
- RUN pip install --no-deps git+https://github.com/facebookresearch/audiocraft.git
32
-
33
  COPY . .
34
 
35
- RUN mkdir -p outputs
36
-
37
  EXPOSE 7860
38
 
39
- CMD ["uvicorn","app:app","--host","0.0.0.0","--port","7860"]
 
1
+ FROM python:3.10-slim
2
 
 
3
  WORKDIR /app
4
 
5
+ # System deps
 
 
6
  RUN apt-get update && apt-get install -y \
 
7
  git \
8
+ ffmpeg \
9
  libsndfile1 \
10
  && rm -rf /var/lib/apt/lists/*
11
 
 
 
 
12
  COPY requirements.txt .
13
 
14
+ RUN pip install --upgrade pip
 
 
 
 
 
 
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
 
 
 
17
  COPY . .
18
 
 
 
19
  EXPOSE 7860
20
 
21
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]