sergey.agapov commited on
Commit
ee0f502
1 Parent(s): e2b8363

initial commit

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -16
Dockerfile CHANGED
@@ -1,21 +1,27 @@
1
  FROM python:3.9
2
 
3
  # Install FFmpeg and other necessary system dependencies
4
- RUN apt-get update && apt-get install -y ffmpeg libportaudio2 libportaudiocpp0 portaudio19-dev
5
-
6
-
7
- WORKDIR /code
8
-
9
- COPY ./requirements.txt /code/requirements.txt
10
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
11
-
12
- COPY . /code
13
-
14
- # Ensure that the working directory has the necessary permissions
15
- RUN chown -R root:root /code
16
-
17
- # Run Git commands with sudo to avoid permission issues
18
- RUN apt-get install -y sudo
19
- RUN sudo git config --global user.email "svabald@users.noreply.huggingface.co"
 
 
 
 
 
 
20
 
21
  CMD ["python", "app.py"]
 
1
  FROM python:3.9
2
 
3
  # Install FFmpeg and other necessary system dependencies
4
+ RUN apt-get update && apt-get install -y \
5
+ ffmpeg \
6
+ libportaudio2 \
7
+ libportaudiocpp0 \
8
+ portaudio19-dev \
9
+ bash \
10
+ git git-lfs \
11
+ wget curl procps \
12
+ htop vim nano && \
13
+ rm -rf /var/lib/apt/lists/*
14
+
15
+ RUN useradd -m -u 1000 user
16
+ USER user
17
+ ENV PATH="/home/user/.local/bin:$PATH"
18
+ # ^ when run as `user`, pip installs executables there
19
+
20
+ WORKDIR /app
21
+
22
+ COPY --chown=user ./requirements.txt requirements.txt
23
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
24
+
25
+ COPY --chown=user . /app
26
 
27
  CMD ["python", "app.py"]