thejagstudio commited on
Commit
1dabd3c
·
verified ·
1 Parent(s): ed56457

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +56 -1
Dockerfile CHANGED
@@ -1,5 +1,60 @@
1
  FROM nvidia/cuda:11.3.1-base-ubuntu20.04
2
- WORKDIR /usr/src/app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  COPY requirements.txt ./
4
  RUN python -m pip install libtorrent
5
  RUN pip install -r requirements.txt
 
1
  FROM nvidia/cuda:11.3.1-base-ubuntu20.04
2
+ ENV DEBIAN_FRONTEND=noninteractive \
3
+ TZ=Europe/Paris
4
+
5
+ # Remove any third-party apt sources to avoid issues with expiring keys.
6
+ # Install some basic utilities
7
+ RUN rm -f /etc/apt/sources.list.d/*.list && \
8
+ apt-get update && apt-get install -y --no-install-recommends \
9
+ curl \
10
+ ca-certificates \
11
+ sudo \
12
+ git \
13
+ wget \
14
+ procps \
15
+ git-lfs \
16
+ zip \
17
+ unzip \
18
+ htop \
19
+ vim \
20
+ nano \
21
+ bzip2 \
22
+ libx11-6 \
23
+ build-essential \
24
+ libsndfile-dev \
25
+ software-properties-common \
26
+ && rm -rf /var/lib/apt/lists/*
27
+
28
+ RUN add-apt-repository ppa:flexiondotorg/nvtop && \
29
+ apt-get upgrade -y && \
30
+ apt-get install -y --no-install-recommends nvtop
31
+
32
+ RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
33
+ apt-get install -y nodejs && \
34
+ npm install -g configurable-http-proxy
35
+ WORKDIR /app
36
+
37
+ # Create a non-root user and switch to it
38
+ RUN adduser --disabled-password --gecos '' --shell /bin/bash user \
39
+ && chown -R user:user /app
40
+ RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user
41
+ USER user
42
+
43
+ # All users can use /home/user as their home directory
44
+ ENV HOME=/home/user
45
+ RUN mkdir $HOME/.cache $HOME/.config \
46
+ && chmod -R 777 $HOME
47
+
48
+ # Set up the Conda environment
49
+ ENV CONDA_AUTO_UPDATE_CONDA=false \
50
+ PATH=$HOME/miniconda/bin:$PATH
51
+ RUN curl -sLo ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh \
52
+ && chmod +x ~/miniconda.sh \
53
+ && ~/miniconda.sh -b -p ~/miniconda \
54
+ && rm ~/miniconda.sh \
55
+ && conda clean -ya
56
+
57
+ WORKDIR $HOME/app
58
  COPY requirements.txt ./
59
  RUN python -m pip install libtorrent
60
  RUN pip install -r requirements.txt