3v324v23 commited on
Commit
6eb06d5
·
1 Parent(s): 8119037

node updated to v18LTS, gitignore added, rclone fix

Browse files
Files changed (3) hide show
  1. .DS_Store +0 -0
  2. Dockerfile +11 -10
  3. start_server.sh +3 -3
.DS_Store CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
 
Dockerfile CHANGED
@@ -3,7 +3,6 @@ FROM nvidia/cuda:11.3.1-base-ubuntu20.04
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 \
@@ -38,10 +37,10 @@ RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - && \
38
  # Set up the Conda environment
39
  ENV CONDA_AUTO_UPDATE_CONDA=false \
40
  PATH=/root/miniconda/bin:$PATH
41
- RUN curl -sLo ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh \
42
- && chmod +x ~/miniconda.sh \
43
- && ~/miniconda.sh -b -p /root/miniconda \
44
- && rm ~/miniconda.sh \
45
  && conda clean -ya
46
 
47
  WORKDIR /root/app
@@ -50,22 +49,24 @@ WORKDIR /root/app
50
  COPY requirements.txt .
51
  RUN /root/miniconda/bin/pip install --no-cache-dir --upgrade -r requirements.txt
52
 
53
- # Ensure jupyter lab is in PATH
54
- ENV PATH="/root/miniconda/bin:$PATH"
55
 
56
  # Copy the current directory contents into the container at /root/app
57
  COPY . /root/app
58
 
59
  # Copy rclone configuration
60
- # COPY rclone.conf /root/.config/rclone/rclone.conf
 
61
 
62
  RUN chmod +x start_server.sh
63
 
64
  COPY login.html /root/miniconda/lib/python3.9/site-packages/jupyter_server/templates/login.html
65
 
66
  # Set dark theme for JupyterLab
67
- RUN mkdir -p /root/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/ && \
68
- echo '{ "theme": "JupyterLab Dark" }' > /root/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/themes.jupyterlab-settings
 
69
 
70
  ENV PYTHONUNBUFFERED=1 \
71
  GRADIO_ALLOW_FLAGGING=never \
 
3
  ENV DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris
4
 
5
  # Remove any third-party apt sources to avoid issues with expiring keys.
 
6
  RUN rm -f /etc/apt/sources.list.d/*.list && \
7
  apt-get update && apt-get install -y --no-install-recommends \
8
  curl \
 
37
  # Set up the Conda environment
38
  ENV CONDA_AUTO_UPDATE_CONDA=false \
39
  PATH=/root/miniconda/bin:$PATH
40
+ RUN curl -sLo /root/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh \
41
+ && chmod +x /root/miniconda.sh \
42
+ && /root/miniconda.sh -b -p /root/miniconda \
43
+ && rm /root/miniconda.sh \
44
  && conda clean -ya
45
 
46
  WORKDIR /root/app
 
49
  COPY requirements.txt .
50
  RUN /root/miniconda/bin/pip install --no-cache-dir --upgrade -r requirements.txt
51
 
52
+ # Create a user and give sudo privileges
53
+ RUN useradd -m -s /bin/bash user && echo 'user:user' | chpasswd && adduser user sudo
54
 
55
  # Copy the current directory contents into the container at /root/app
56
  COPY . /root/app
57
 
58
  # Copy rclone configuration
59
+ COPY rclone.conf /home/user/.config/rclone/rclone.conf
60
+ RUN chown -R user:user /home/user/.config
61
 
62
  RUN chmod +x start_server.sh
63
 
64
  COPY login.html /root/miniconda/lib/python3.9/site-packages/jupyter_server/templates/login.html
65
 
66
  # Set dark theme for JupyterLab
67
+ USER user
68
+ RUN mkdir -p /home/user/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/ && \
69
+ echo '{ "theme": "JupyterLab Dark" }' > /home/user/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/themes.jupyterlab-settings
70
 
71
  ENV PYTHONUNBUFFERED=1 \
72
  GRADIO_ALLOW_FLAGGING=never \
start_server.sh CHANGED
@@ -2,12 +2,12 @@
2
 
3
  echo "Starting Jupyter Lab with token [REDACTED]"
4
 
5
- NOTEBOOK_DIR="/data"
6
 
7
  # Mount Google Drive
8
- # rclone mount gdrive: /root/GoogleDrive --daemon
9
 
10
- /root/miniconda/bin/jupyter-lab \
11
  --ip 0.0.0.0 \
12
  --port 7860 \
13
  --no-browser \
 
2
 
3
  echo "Starting Jupyter Lab with token [REDACTED]"
4
 
5
+ NOTEBOOK_DIR="/root/app/data"
6
 
7
  # Mount Google Drive
8
+ rclone mount gdrive: /home/user/GoogleDrive --daemon
9
 
10
+ jupyter-lab \
11
  --ip 0.0.0.0 \
12
  --port 7860 \
13
  --no-browser \