2cylu2 commited on
Commit
583c387
·
verified ·
1 Parent(s): d79648a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -11
Dockerfile CHANGED
@@ -3,32 +3,32 @@ FROM python:3.10
3
  # Install system dependencies
4
  RUN apt-get update && \
5
  apt-get install -y ffmpeg libsndfile1 git-lfs && \
6
- git lfs install
 
7
 
8
  # Create non-root user
9
  RUN useradd -m -u 1000 user
10
  USER user
11
- ENV PATH="/home/user/.local/bin:$PATH"
12
 
13
- WORKDIR /app
 
14
 
15
- # Copy everything first (including pyharp folder)
16
- COPY --chown=user . /app
17
 
18
  # Upgrade pip
19
  RUN pip install --no-cache-dir --upgrade pip
20
 
21
- # Install pyharp
22
- RUN pip install --no-cache-dir git+https://github.com/TEAMuP-dev/pyharp
23
-
24
-
25
- # Install other dependencies
26
  RUN pip install --no-cache-dir \
27
  gradio \
28
  matchering \
29
  symusic \
30
- git+https://github.com/descriptinc/audiotools
 
31
 
32
  EXPOSE 7860
33
 
34
  CMD ["python", "app.py"]
 
 
3
  # Install system dependencies
4
  RUN apt-get update && \
5
  apt-get install -y ffmpeg libsndfile1 git-lfs && \
6
+ git lfs install && \
7
+ rm -rf /var/lib/apt/lists/*
8
 
9
  # Create non-root user
10
  RUN useradd -m -u 1000 user
11
  USER user
12
+ WORKDIR /home/user/app
13
 
14
+ ENV PATH="/home/user/.local/bin:$PATH"
15
+ ENV PYTHONUNBUFFERED=1
16
 
17
+ # Copy files
18
+ COPY --chown=user . .
19
 
20
  # Upgrade pip
21
  RUN pip install --no-cache-dir --upgrade pip
22
 
23
+ # Install all Python deps in ONE layer (important)
 
 
 
 
24
  RUN pip install --no-cache-dir \
25
  gradio \
26
  matchering \
27
  symusic \
28
+ git+https://github.com/descriptinc/audiotools \
29
+ git+https://github.com/TEAMuP-dev/pyharp
30
 
31
  EXPOSE 7860
32
 
33
  CMD ["python", "app.py"]
34
+