Skip to content

Conversation

@Vismayak
Copy link
Contributor

@Vismayak Vismayak commented Jun 6, 2024

This PR introduces the integration of JupyterHub into our development and production environments.

Development Setup:

  1. Create a .env-dev file following the format in .env-example, paying special attention to the DOCKER_NETWORK_NAME and filling in JUPYTERHUB_CRYPT_KEY.
  2. Start the JupyterHub server using the shell command:
    ./docker-dev.sh jupyter up
    
    To stop the server, use:
    ./docker-dev.sh jupyter down
    
    The JupyterHub can be accessed from the front end via the sidebar.
    image

Production Setup:

  1. Set up a .env file as per .env-example. Ensure to add JUPYTERHUB_CRYPT_KEY.
  2. Deploy using:
    docker-compose -f docker-compose.yml -f docker-compose.jupyter.yml up -d
    
    The JupyterHub is accessible only via the local Clowder URL with the postfix /jupyterhub (default http://localhost/jupyterhub/). It requires logging into the Clowder homepage first; direct access is not allowed. Since we dont have the frontend image that has the updated sidebar, login and then access by manually entering URL

image

Notes:

  • The development setup does not use Traefik and directly connects to http://localhost:8765.
  • The production setup utilizes Traefik for routing to the notebook server.

Please ensure that your environment files are configured correctly before running the setup commands.

@Vismayak Vismayak requested a review from max-zilla as a code owner June 6, 2024 14:52
@Vismayak Vismayak linked an issue Jun 6, 2024 that may be closed by this pull request
Copy link
Member

@longshuicy longshuicy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you DM me you env setting? I tried following the example env but somehow i can't get to the port. I can see jupyter container is running though.

image

@Vismayak Vismayak requested a review from longshuicy June 7, 2024 20:59
@longshuicy longshuicy requested review from ddey2 and tcnichol June 10, 2024 14:40
@Vismayak Vismayak marked this pull request as draft June 21, 2024 16:22
@Vismayak Vismayak changed the title Integration of Jupyter through docker-compose [WIP] Integration of Jupyter through docker-compose Jun 21, 2024
@Vismayak
Copy link
Contributor Author

Converting it into draft to use traefik to handle redirects to jupyterlab

@Vismayak Vismayak marked this pull request as ready for review June 21, 2024 19:22
@Vismayak Vismayak changed the title [WIP] Integration of Jupyter through docker-compose Integration of Jupyter through docker-compose Jun 21, 2024
@ddey2
Copy link
Member

ddey2 commented Jun 24, 2024

I see this.
Screenshot 2024-06-24 at 2 27 27 PM
Not sure why but the container kept on restarting.
@Vismayak What crypt key should I enter in .env-dev file?

Copy link
Member

@longshuicy longshuicy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in both dev and prod mode:

  • Redirect to jupyter lab and run notebooks ok
  • Shutdown
  • Logout seems to work with one caveat that it also logged out on the frontend. Need to refresh to see that reflect
  • Multiple users instantiating different jupyter labs and run notebooks ok
  • Note when in production, you need to build the frontend image and point the docker-compose.yml. Otherwise it will pull the existing 2.0.0.beta.2 image from docker.io

@lmarini lmarini added this to the v2.0-beta-3 milestone Jun 28, 2024
@ddey2
Copy link
Member

ddey2 commented Jun 28, 2024

@Vismayak I still cannot run it on dev environment. I can run it on prod and it works fine there.
Also, I see some frontend 'cannot find module' error, you might want to merge main into this.

@longshuicy If you have run it on both dev and prod, I think we can merge this. I may be missing some config for dev, network name.

@longshuicy
Copy link
Member

@Vismayak I still cannot run it on dev environment. I can run it on prod and it works fine there. Also, I see some frontend 'cannot find module' error, you might want to merge main into this.

@longshuicy If you have run it on both dev and prod, I think we can merge this. I may be missing some config for dev, network name.

I use the same config but change the network name
docker network ls will list the current exist network names.

If you still can't get it run, maybe let's merge early next week?

@longshuicy longshuicy merged commit f982515 into main Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jupyterhub Integration to Clowder

4 participants