Commit 35a6155f authored by Decoupes Remy's avatar Decoupes Remy Committed by Quentin Yeche
Browse files

Error of jupyterhub at start

parent 6fc78b59
No related merge requests found
Showing with 16 additions and 12 deletions
+16 -12
...@@ -8,22 +8,30 @@ ARG env_name=rs-notebooks ...@@ -8,22 +8,30 @@ ARG env_name=rs-notebooks
ADD *.ipynb /notebooks/ ADD *.ipynb /notebooks/
ADD sample.geojson /notebooks/ ADD sample.geojson /notebooks/
# creating user
RUN useradd -m beyond &&\
chown -R beyond:beyond /notebooks
# creating environment # creating environment
ADD environment_jupyterhub.yml ${dest_yml} ADD environment_jupyterhub.yml ${dest_yml}
RUN mamba env create --file ${dest_yml} --name ${env_name} RUN mamba env create --file ${dest_yml} --name ${env_name}
# setting up shell to run in the correct environment # setting up shell to use conda run
SHELL ["conda", "run", "-n", "rs-notebooks", "/bin/bash", "-c"] # this ensures that the CMD command is run in the correct environment
SHELL ["conda", "run", "--no-capture-output","-n", "rs-notebooks", "/bin/bash", "-c"]
# setting up jupyter lab to use bash as a terminal # setting up jupyter lab to use bash as a terminal
# this ensures that the right environment is activated in the terminal # this ensures that the right environment is activated in the terminal
# should allow users to run pip installs from notebooks/jupyter lab terminal # should allow users to run pip installs from notebooks/jupyter lab terminal
# without encountering issues with different environments # without encountering issues with different environments
#RUN /opt/conda/envs/rs-notebooks/bin/jupyter lab --generate-config && \ RUN jupyter lab --generate-config && \
#RUN jupyter lab --generate-config && \ echo 'c.NotebookApp.terminado_settings = { "shell_command": ["/bin/bash"] }' >> /root/.jupyter/jupyter_lab_config.py
# echo 'c.NotebookApp.terminado_settings = { "shell_command": ["/bin/bash"] }' >> /root/.jupyter/jupyter_lab_config.py
# setting up default landing folder # setting up default landing folder
WORKDIR /notebooks WORKDIR /notebooks
CMD jupyterhub-singleuser # choosing new user as default
USER beyond
CMD jupyterhub-singleuser
\ No newline at end of file
...@@ -10,16 +10,12 @@ dependencies: ...@@ -10,16 +10,12 @@ dependencies:
- matplotlib - matplotlib
- folium - folium
- rioxarray - rioxarray
- jupyterhub-singleuser=3.0.0 - jupyterhub==4.0.2
- jupyterlab
- pip - pip
- pip: - pip:
- planetary-computer - planetary-computer
- pystac-client - pystac-client
# with planetary-computer and pystac-client
# jsonschema==4.17.3 gets installed and breaks jupyter
# might be fixed in later version of jupyter, planetary-computer
# or pystac-client
- jsonschema==4.19.0
- rich - rich
- stackstac - stackstac
- bottleneck - bottleneck
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment