Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of workdir when starting the container #2

Open
katilp opened this issue Jul 9, 2024 · 1 comment
Open

Use of workdir when starting the container #2

katilp opened this issue Jul 9, 2024 · 1 comment

Comments

@katilp
Copy link

katilp commented Jul 9, 2024

I observed during the QCD school that it often happened when people needed to start a new container and came back to the first instructions in https://cms-opendata-workshop.github.io/workshop2024-lesson-docker/instructor/03-docker-for-cms-opendata.html#python-tools-container and https://cms-opendata-workshop.github.io/workshop2024-lesson-docker/instructor/03-docker-for-cms-opendata.html#root-tools-container
that they forgot to set export workpath=$PWD. Me included...

The docker run command works but if they are not at the intended directory level it creates a new cms_open_data_nnn wherever they run the command. Then it gives trouble afterwards because of permissions or the fact that it does not have the files they might have had there at that point.

Maybe we could think of changing the instructions to

mkdir cms_open_data_root
chmod -R 777 cms_open_data_root
cd cms_open_data_root

and

mkdir cms_open_data_python
chmod -R 777 cms_open_data_python
cd cms_open_data_python

and then have -v ${pwd}:/code in the docker run command

@katilp
Copy link
Author

katilp commented Jul 9, 2024

NB, if this is changed, remember to update https://cms-opendata-workshop.github.io/workshop2024-lesson-docker/instructor/03-docker-for-cms-opendata.html#permission-denied (remove "to define the path variable,")

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

No branches or pull requests

1 participant