Kangarroar commited on
Commit
4dc849e
1 Parent(s): 28d4720

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -27
Dockerfile CHANGED
@@ -1,43 +1,29 @@
1
- FROM nvidia/cuda:11.8.0-devel-ubuntu18.04
2
-
3
- ARG DEBIAN_FRONTEND=noninteractive
4
- ENV PYTHONUNBUFFERED=1
5
- ENV PYTHON_INCLUDE /usr/include/python3.8
6
- ENV PYTHON_LIB /usr/lib/x86_64-linux-gnu/libpython3.8.so
7
 
8
  WORKDIR /app
9
- # Install python, git & ffmpeg
10
- RUN apt-get update && apt-get install --no-install-recommends -y \
11
- build-essential \
12
- python3.9 \
13
- python3-pip \
14
- git \
15
- ffmpeg \
16
- && apt-get clean && rm -rf /var/lib/apt/lists/*
17
  COPY ./requirements.txt /app/requirements.txt
18
  COPY ./packages.txt /app/packages.txt
19
- RUN pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
20
  RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
21
- RUN apt-get update && apt-get install -y python3-dev
22
- RUN apt-get update && apt-get install -y build-essential
23
- RUN which python3
24
- RUN which python3-config
25
  RUN pip3 install --no-cache-dir -r /app/requirements.txt
26
- RUN apt-get update && apt-get install -y build-essential
27
- RUN pip3 install --no-cache-dir numba==0.56.3
28
- RUN pip install --upgrade pip setuptools wheel
29
- RUN pip3 install --no-binary :all: pyworld
30
- RUN pip install soundfile
31
 
32
- WORKDIR /app
33
  # Set up a new user named "user" with user ID 1000
34
  RUN useradd -m -u 1000 user
 
 
 
 
 
 
 
 
35
  # Set the working directory to the user's home directory
36
  WORKDIR $HOME/app
37
 
38
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
39
  COPY --chown=user . $HOME/app
40
 
 
41
  EXPOSE 8501
42
- CMD nvidia-smi -l
43
- CMD streamlit run app.py --server.maxUploadSize 1024 --server.enableWebsocketCompression=false --server.enableXsrfProtection=false
 
1
+ FROM python:3.8.10
 
 
 
 
 
2
 
3
  WORKDIR /app
4
+
 
 
 
 
 
 
 
5
  COPY ./requirements.txt /app/requirements.txt
6
  COPY ./packages.txt /app/packages.txt
 
7
  RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
 
 
 
 
8
  RUN pip3 install --no-cache-dir -r /app/requirements.txt
 
 
 
 
 
9
 
10
+
11
  # Set up a new user named "user" with user ID 1000
12
  RUN useradd -m -u 1000 user
13
+
14
+ # Switch to the "user" user
15
+ USER user
16
+
17
+ # Set home to the user's home directory
18
+ ENV HOME=/home/user \
19
+ PATH=/home/user/.local/bin:$PATH
20
+
21
  # Set the working directory to the user's home directory
22
  WORKDIR $HOME/app
23
 
24
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
25
  COPY --chown=user . $HOME/app
26
 
27
+
28
  EXPOSE 8501
29
+ CMD streamlit run app.py --server.maxUploadSize 1024 --server.enableWebsocketCompression=false --server.enableXsrfProtection=false