derek-thomas HF staff commited on
Commit
83b5e1e
1 Parent(s): 8a1aeb9

Trying again to run on_startup_user.sh

Browse files
Files changed (4) hide show
  1. Dockerfile +1 -1
  2. on_startup.sh +1 -1
  3. on_startup_user.sh +0 -1
  4. start_server.sh +3 -0
Dockerfile CHANGED
@@ -88,7 +88,7 @@ RUN --mount=target=requirements.txt,source=requirements.txt \
88
  pip install --no-cache-dir --upgrade -r requirements.txt
89
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
90
  COPY --chown=user . $HOME/app
91
- RUN bash /home/user/app/on_startup_user.sh
92
  #RUN --mount=target=/home/user/app/on_startup_user.sh,source=on_startup_user.sh,readwrite \
93
  # bash /home/user/app/on_startup_user.sh
94
 
 
88
  pip install --no-cache-dir --upgrade -r requirements.txt
89
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
90
  COPY --chown=user . $HOME/app
91
+ # RUN chmod +x /home/user/app/on_startup_user.sh && bash /home/user/app/on_startup_user.sh
92
  #RUN --mount=target=/home/user/app/on_startup_user.sh,source=on_startup_user.sh,readwrite \
93
  # bash /home/user/app/on_startup_user.sh
94
 
on_startup.sh CHANGED
@@ -10,4 +10,4 @@ echo '* soft nproc 1024' | sudo tee -a /etc/security/limits.conf
10
  echo '* hard nproc 2048' | sudo tee -a /etc/security/limits.conf
11
 
12
  echo 'session required pam_limits.so' | sudo tee -a /etc/pam.d/common-session
13
- echo 'session required pam_limits.so' | sudo tee -a /etc/pam.d/common-session-noninteractive
 
10
  echo '* hard nproc 2048' | sudo tee -a /etc/security/limits.conf
11
 
12
  echo 'session required pam_limits.so' | sudo tee -a /etc/pam.d/common-session
13
+ echo 'session required pam_limits.so' | sudo tee -a /etc/pam.d/common-session-noninteractive
on_startup_user.sh CHANGED
@@ -33,4 +33,3 @@ rm -rf /tmp/tgi-notebooks-optimization
33
  # Add dark theme
34
  mkdir -p ~/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/ && \
35
  echo '{ "theme":"JupyterLab Dark" }' > ~/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/themes.jupyterlab-settings
36
-
 
33
  # Add dark theme
34
  mkdir -p ~/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/ && \
35
  echo '{ "theme":"JupyterLab Dark" }' > ~/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/themes.jupyterlab-settings
 
start_server.sh CHANGED
@@ -5,6 +5,9 @@ echo "Starting Jupyter Lab with token $JUPYTER_TOKEN"
5
 
6
  NOTEBOOK_DIR="/data/"
7
 
 
 
 
8
  jupyter-lab \
9
  --ip 0.0.0.0 \
10
  --port 7860 \
 
5
 
6
  NOTEBOOK_DIR="/data/"
7
 
8
+ bash /home/user/app/on_startup_user.sh
9
+ cp ~/app/login.html /data
10
+
11
  jupyter-lab \
12
  --ip 0.0.0.0 \
13
  --port 7860 \