basyx commited on
Commit
8bc9bce
·
verified ·
1 Parent(s): 330ed0e

Update Dockerfile

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