3v324v23 commited on
Commit
02f657c
·
1 Parent(s): d8aa570

updated dockerfile

Browse files
.history/Dockerfile_20240520012211 ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:11.3.1-base-ubuntu20.04
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive \
4
+ TZ=Europe/Paris
5
+
6
+ # Remove any third-party apt sources to avoid issues with expiring keys.
7
+ # Install some basic utilities
8
+ RUN rm -f /etc/apt/sources.list.d/*.list && \
9
+ apt-get update && apt-get install -y --no-install-recommends \
10
+ curl \
11
+ ca-certificates \
12
+ sudo \
13
+ git \
14
+ git-lfs \
15
+ zip \
16
+ unzip \
17
+ htop \
18
+ bzip2 \
19
+ libx11-6 \
20
+ build-essential \
21
+ libsndfile-dev \
22
+ software-properties-common \
23
+ && rm -rf /var/lib/apt/lists/*
24
+
25
+ RUN add-apt-repository ppa:flexiondotorg/nvtop && \
26
+ apt-get upgrade -y && \
27
+ apt-get install -y --no-install-recommends nvtop
28
+
29
+ RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
30
+ apt-get install -y nodejs && \
31
+ npm install -g configurable-http-proxy
32
+
33
+ # Create a working directory
34
+ WORKDIR /app
35
+
36
+ # Create a non-root user and switch to it
37
+ RUN adduser --disabled-password --gecos '' --shell /bin/bash user \
38
+ && chown -R user:user /app
39
+ RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user
40
+ USER user
41
+
42
+ # All users can use /home/user as their home directory
43
+ ENV HOME=/home/user
44
+ RUN mkdir $HOME/.cache $HOME/.config \
45
+ && chmod -R 777 $HOME
46
+
47
+ # Set up the Conda environment
48
+ ENV CONDA_AUTO_UPDATE_CONDA=false \
49
+ PATH=$HOME/miniconda/bin:$PATH
50
+ RUN curl -sLo ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh \
51
+ && chmod +x ~/miniconda.sh \
52
+ && ~/miniconda.sh -b -p ~/miniconda \
53
+ && rm ~/miniconda.sh \
54
+ && conda clean -ya
55
+
56
+ WORKDIR $HOME/app
57
+
58
+ #######################################
59
+ # Start root user section
60
+ #######################################
61
+
62
+ USER root
63
+
64
+ # User Debian packages
65
+ ## Security warning : Potential user code executed as root (build time)
66
+ RUN --mount=target=/root/packages.txt,source=packages.txt \
67
+ apt-get update && \
68
+ xargs -r -a /root/packages.txt apt-get install -y --no-install-recommends \
69
+ && rm -rf /var/lib/apt/lists/*
70
+
71
+ RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
72
+ bash /root/on_startup.sh
73
+
74
+ RUN mkdir /data && chown user:user /data
75
+
76
+ #######################################
77
+ # End root user section
78
+ #######################################
79
+
80
+ USER user
81
+
82
+ # Python packages
83
+ RUN --mount=target=requirements.txt,source=requirements.txt \
84
+ pip install --no-cache-dir --upgrade -r requirements.txt
85
+
86
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
87
+ COPY --chown=user . $HOME/app
88
+
89
+ RUN chmod +x start_server.sh
90
+
91
+ COPY --chown=user login.html /home/user/miniconda/lib/python3.9/site-packages/jupyter_server/templates/login.html
92
+
93
+ ENV PYTHONUNBUFFERED=1 \
94
+ GRADIO_ALLOW_FLAGGING=never \
95
+ GRADIO_NUM_PORTS=1 \
96
+ GRADIO_SERVER_NAME=0.0.0.0 \
97
+ GRADIO_THEME=huggingface \
98
+ SYSTEM=spaces \
99
+ SHELL=/bin/bash
100
+
101
+ CMD ["./start_server.sh"]
.history/Dockerfile_20240520142534 ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:11.3.1-base-ubuntu20.04
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive 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
+ git-lfs \
14
+ zip \
15
+ unzip \
16
+ htop \
17
+ bzip2 \
18
+ libx11-6 \
19
+ build-essential \
20
+ libsndfile-dev \
21
+ software-properties-common \
22
+ openssh-server \
23
+ && rm -rf /var/lib/apt/lists/*
24
+
25
+ RUN add-apt-repository ppa:flexiondotorg/nvtop && \
26
+ apt-get upgrade -y && \
27
+ apt-get install -y --no-install-recommends nvtop
28
+
29
+ RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
30
+ apt-get install -y nodejs && \
31
+ npm install -g configurable-http-proxy
32
+
33
+ # Create a working directory
34
+ WORKDIR /app
35
+
36
+ # Create a non-root user and switch to it
37
+ RUN adduser --disabled-password --gecos '' --shell /bin/bash user \
38
+ && chown -R user:user /app
39
+ RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user
40
+ USER user
41
+
42
+ # All users can use /home/user as their home directory
43
+ ENV HOME=/home/user
44
+ RUN mkdir $HOME/.cache $HOME/.config \
45
+ && chmod -R 777 $HOME
46
+
47
+ # Set up the Conda environment
48
+ ENV CONDA_AUTO_UPDATE_CONDA=false \
49
+ PATH=$HOME/miniconda/bin:$PATH
50
+ RUN curl -sLo ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh \
51
+ && chmod +x ~/miniconda.sh \
52
+ && ~/miniconda.sh -b -p ~/miniconda \
53
+ && rm ~/miniconda.sh \
54
+ && conda clean -ya
55
+
56
+ WORKDIR $HOME/app
57
+
58
+ #######################################
59
+ # Start root user section
60
+ #######################################
61
+
62
+ USER root
63
+
64
+ # User Debian packages
65
+ ## Security warning : Potential user code executed as root (build time)
66
+ RUN --mount=target=/root/packages.txt,source=packages.txt \
67
+ apt-get update && \
68
+ xargs -r -a /root/packages.txt apt-get install -y --no-install-recommends \
69
+ && rm -rf /var/lib/apt/lists/*
70
+
71
+ RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
72
+ bash /root/on_startup.sh
73
+
74
+ RUN mkdir /data && chown user:user /data
75
+
76
+ #######################################
77
+ # End root user section
78
+ #######################################
79
+
80
+ USER user
81
+
82
+ # Python packages
83
+ RUN --mount=target=requirements.txt,source=requirements.txt \
84
+ pip install --no-cache-dir --upgrade -r requirements.txt
85
+
86
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
87
+ COPY --chown=user . $HOME/app
88
+
89
+ RUN chmod +x start_server.sh
90
+
91
+ COPY --chown=user login.html /home/user/miniconda/lib/python3.9/site-packages/jupyter_server/templates/login.html
92
+
93
+ ENV PYTHONUNBUFFERED=1 \
94
+ GRADIO_ALLOW_FLAGGING=never \
95
+ GRADIO_NUM_PORTS=1 \
96
+ GRADIO_SERVER_NAME=0.0.0.0 \
97
+ GRADIO_THEME=huggingface \
98
+ SYSTEM=spaces \
99
+ SHELL=/bin/bash
100
+
101
+ CMD ["./start_server.sh"]
Dockerfile CHANGED
@@ -1,7 +1,6 @@
1
  FROM nvidia/cuda:11.3.1-base-ubuntu20.04
2
 
3
- ENV DEBIAN_FRONTEND=noninteractive \
4
- TZ=Europe/Paris
5
 
6
  # Remove any third-party apt sources to avoid issues with expiring keys.
7
  # Install some basic utilities
@@ -20,6 +19,7 @@ RUN rm -f /etc/apt/sources.list.d/*.list && \
20
  build-essential \
21
  libsndfile-dev \
22
  software-properties-common \
 
23
  && rm -rf /var/lib/apt/lists/*
24
 
25
  RUN add-apt-repository ppa:flexiondotorg/nvtop && \
@@ -69,7 +69,7 @@ RUN --mount=target=/root/packages.txt,source=packages.txt \
69
  && rm -rf /var/lib/apt/lists/*
70
 
71
  RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
72
- bash /root/on_startup.sh
73
 
74
  RUN mkdir /data && chown user:user /data
75
 
@@ -91,11 +91,11 @@ RUN chmod +x start_server.sh
91
  COPY --chown=user login.html /home/user/miniconda/lib/python3.9/site-packages/jupyter_server/templates/login.html
92
 
93
  ENV PYTHONUNBUFFERED=1 \
94
- GRADIO_ALLOW_FLAGGING=never \
95
- GRADIO_NUM_PORTS=1 \
96
- GRADIO_SERVER_NAME=0.0.0.0 \
97
- GRADIO_THEME=huggingface \
98
- SYSTEM=spaces \
99
- SHELL=/bin/bash
100
 
101
  CMD ["./start_server.sh"]
 
1
  FROM nvidia/cuda:11.3.1-base-ubuntu20.04
2
 
3
+ ENV DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris
 
4
 
5
  # Remove any third-party apt sources to avoid issues with expiring keys.
6
  # Install some basic utilities
 
19
  build-essential \
20
  libsndfile-dev \
21
  software-properties-common \
22
+ openssh-server \
23
  && rm -rf /var/lib/apt/lists/*
24
 
25
  RUN add-apt-repository ppa:flexiondotorg/nvtop && \
 
69
  && rm -rf /var/lib/apt/lists/*
70
 
71
  RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
72
+ bash /root/on_startup.sh
73
 
74
  RUN mkdir /data && chown user:user /data
75
 
 
91
  COPY --chown=user login.html /home/user/miniconda/lib/python3.9/site-packages/jupyter_server/templates/login.html
92
 
93
  ENV PYTHONUNBUFFERED=1 \
94
+ GRADIO_ALLOW_FLAGGING=never \
95
+ GRADIO_NUM_PORTS=1 \
96
+ GRADIO_SERVER_NAME=0.0.0.0 \
97
+ GRADIO_THEME=huggingface \
98
+ SYSTEM=spaces \
99
+ SHELL=/bin/bash
100
 
101
  CMD ["./start_server.sh"]