basyx commited on
Commit
86ad64e
·
verified ·
1 Parent(s): b2bbd1e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -31
Dockerfile CHANGED
@@ -1,49 +1,21 @@
1
  FROM python:3.10-slim
2
 
3
- ENV PYTHONUNBUFFERED=1
4
- ENV PYTHONDONTWRITEBYTECODE=1
5
-
6
  WORKDIR /app
7
 
8
- # --------------------------------------------------
9
- # SYSTEM DEPENDENCIES (SAFE MINIMAL SET)
10
- # --------------------------------------------------
11
  RUN apt-get update && apt-get install -y \
12
  git \
13
  ffmpeg \
14
  libsndfile1 \
15
- build-essential \
16
- curl \
17
  && rm -rf /var/lib/apt/lists/*
18
 
19
- # --------------------------------------------------
20
- # PYTHON CORE
21
- # --------------------------------------------------
22
  COPY requirements.txt .
23
 
24
- RUN pip install --upgrade pip setuptools wheel
25
-
26
- RUN pip install --no-cache-dir \
27
- torch \
28
- torchaudio \
29
- --index-url https://download.pytorch.org/whl/cpu
30
-
31
  RUN pip install --no-cache-dir -r requirements.txt
32
 
33
- # --------------------------------------------------
34
- # INSTALL MUSICGEN WITHOUT PYAV TRIGGER
35
- # --------------------------------------------------
36
- RUN pip install --no-cache-dir git+https://github.com/facebookresearch/audiocraft.git
37
-
38
- # --------------------------------------------------
39
- # APP
40
- # --------------------------------------------------
41
  COPY . .
42
 
43
- RUN mkdir -p outputs
44
-
45
  EXPOSE 7860
46
 
47
- HEALTHCHECK CMD curl --fail http://localhost:7860/health || exit 1
48
-
49
- CMD ["python", "app.py"]
 
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"]