Skip to content

Use of workdir when starting the container #2

@katilp

Description

@katilp

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions