Kangarroar commited on
Commit
6a0e3ae
1 Parent(s): 212db8b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -7
Dockerfile CHANGED
@@ -1,4 +1,22 @@
1
- FROM anibali/pytorch:1.13.0-cuda11.8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  WORKDIR /app
3
  # Set up a new user named "user" with user ID 1000
4
  RUN useradd -m -u 1000 user
@@ -13,12 +31,6 @@ ENV HOME=/home/user \
13
  # Set the working directory to the user's home directory
14
  WORKDIR $HOME/app
15
 
16
- COPY ./requirements.txt /app/requirements.txt
17
- COPY ./packages.txt /app/packages.txt
18
- 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
19
- RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
20
- RUN pip3 install --no-cache-dir -r /app/requirements.txt
21
-
22
 
23
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
24
  COPY --chown=user . $HOME/app
 
1
+ FROM nvidia/cuda:12.0.0-base-ubuntu20.04
2
+ ARG DEBIAN_FRONTEND=noninteractive
3
+ ENV PYTHONUNBUFFERED=1
4
+
5
+ WORKDIR /app
6
+ # Install python, git & ffmpeg
7
+ RUN apt-get update && apt-get install --no-install-recommends -y \
8
+ build-essential \
9
+ python3.9 \
10
+ python3-pip \
11
+ git \
12
+ ffmpeg \
13
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
14
+ COPY ./requirements.txt /app/requirements.txt
15
+ COPY ./packages.txt /app/packages.txt
16
+ 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
17
+ RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
18
+ RUN pip3 install --no-cache-dir -r /app/requirements.txt
19
+
20
  WORKDIR /app
21
  # Set up a new user named "user" with user ID 1000
22
  RUN useradd -m -u 1000 user
 
31
  # Set the working directory to the user's home directory
32
  WORKDIR $HOME/app
33
 
 
 
 
 
 
 
34
 
35
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
36
  COPY --chown=user . $HOME/app