GithubHelp home page GithubHelp logo

Comments (2)

RattyDAVE avatar RattyDAVE commented on May 29, 2024

Hi,

In answer to 1.

I would not recomend it all. But that have never stopped me.

I have not tried this but I am guessing something like the following but with more checking.

Script on host machine that runs before docker.

Extract the usernames from /etc/passwd and put into %LOCAL_PATH_TO_CREATEUSERS.TXT_FILE%
then you need to think about the passwords.

DO NOT do the following as that will change ALL the users to the hosts users. Including the service users.

-v /etc/password:/etc/password
-v /etc/shadow:/etc/shadow
-v /home:/home

In answer to 2.

This is two questions.

  • I want to configure volume from /home/ (on host) to /home/ on the image.

Already done!
-v %LOCAL_PATH_TO_HOMES%:/home
Replace %LOCAL_PATH_TO_HOMES% with the path to the home directory on the host file system.

  • I was looking for a way to add one shared directory between all users, where they can store shared scripts and and rest of them be private to each user.

You will need some sort of add-in for that. I have not looked into that. The way I share content is use a github repo. Then PULL in from that. (as seen in the quick download of the tutorials.)

Hope this helps

DAVE

from docker-jupyterhub.

heyarne avatar heyarne commented on May 29, 2024

Hey! I also needed to share data across user accounts and I was able to reproduce this guide (more specifically option 3, which allows you to share read-only notebooks and data).
To do that I added a custom /root/startup.sh with the following contents:

#!/usr/bin/env bash
set -ex

# This is configured as per option 3 here: https://tljh.jupyter.org/en/latest/howto/content/share-data.html

echo 'Configuring shared folder…'
groupadd jupyterhub-users

mkdir -p /srv/scratch
chown root:jupyterhub-users /srv/scratch
chmod 777 /srv/scratch
chmod g+s /srv/scratch

users="$(cat /root/startup.sh | cut -d: -f1)"
for user in $users
do
  usermod -aG jupyterhub-users $user
  ln -s /srv/scratch/ /home/$user/shared
done

This adds a shared folder in each users home directory, which they can move notebooks to. Hope this helps!

from docker-jupyterhub.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.