# Use repo2docker container with singularoty

**URL:** <https://discourse.jupyter.org/t/use-repo2docker-container-with-singularoty/33770>\
**Category:** Binder\
**Tags:** how-to, repo2docker\
**Created:** [March 14, 2025, 8:31am UTC](https://discourse.jupyter.org/t/use-repo2docker-container-with-singularoty/33770 "2025-03-14T08:31:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roussman](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/roussman/32/17924_2.png) [@Roussman](https://discourse.jupyter.org/u/Roussman)\
**Post date:** [March 14, 2025, 8:31am UTC](https://discourse.jupyter.org/t/use-repo2docker-container-with-singularoty/33770/1 "2025-03-14T08:31:34Z")

</div>

Hello,  
We are trying to use a container made with repo2Docker on our HPC system, but we are using singularity with our /home mounted automatically. We can’t access /home/jovyan when we launch our container.

Is there procedure to use repo2Docker with singularity ?

Thank you,

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [March 14, 2025, 10:12am UTC](https://discourse.jupyter.org/t/use-repo2docker-container-with-singularoty/33770/2 "2025-03-14T10:12:33Z")

</div>

repo2docker has a `--user-id` flag. If you set that to the owner of your mounted directory does it work?

---

<div class="post-metadata">

**Author:** ![Roussman](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/roussman/32/17924_2.png) [@Roussman](https://discourse.jupyter.org/u/Roussman)\
**Post date:** [March 14, 2025, 10:37am UTC](https://discourse.jupyter.org/t/use-repo2docker-container-with-singularoty/33770/3 "2025-03-14T10:37:25Z")

</div>

This option changes the user name, but it is still not recognized by our file system and belongs to root.

github action :

```auto
    - name: update jupyter dependencies with repo2docker
      uses: jupyterhub/repo2docker-action@master
      with:
        DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
        DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
        NOTEBOOK_USER: roussman

```

singularity creation :

```auto
singularity shell --env JUPYTER_ENABLE_LAB=yes docker://roussman/pytudes
Singularity> ls -ls /home
total 1
0 drwxr-xr-x. 3 roussman ipadefaultgp 60 Mar 14 10:16 qt
1 drwxr-x---. 2 root root 66 Mar 14 09:51 roussman

```

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [March 14, 2025, 3:37pm UTC](https://discourse.jupyter.org/t/use-repo2docker-container-with-singularoty/33770/4 "2025-03-14T15:37:21Z")

</div>

The username argument is separate from the user ID. You didn’t mention you were using the GitHub action- it doesn’t support the user-id argument, instead you could run repo2docker directly in your GitHub workflow.

---

<div class="post-metadata">

**Author:** ![Roussman](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/roussman/32/17924_2.png) [@Roussman](https://discourse.jupyter.org/u/Roussman)\
**Post date:** [March 17, 2025, 8:30am UTC](https://discourse.jupyter.org/t/use-repo2docker-container-with-singularoty/33770/5 "2025-03-17T08:30:31Z")

</div>

I’ve tried setting the user\_id as my own, but I still have the same problem. Another problem is that this container is to be used by several users, so I can’t set it for my account alone. I managed to access the repository inside the container by adding a chmod in the container creation. Can I add this option and make a merge request in the repo2docker project?

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [March 17, 2025, 10:32am UTC](https://discourse.jupyter.org/t/use-repo2docker-container-with-singularoty/33770/6 "2025-03-17T10:32:59Z")

</div>

I’m surprised setting the user-id didn’t work. Can you share the full repo2docker command line and an example repository that you’re having problems with? Which version of repo2docker are you using?

---

<div class="post-metadata">

**Author:** ![Roussman](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/roussman/32/17924_2.png) [@Roussman](https://discourse.jupyter.org/u/Roussman)\
**Post date:** [March 17, 2025, 12:51pm UTC](https://discourse.jupyter.org/t/use-repo2docker-container-with-singularoty/33770/7 "2025-03-17T12:51:48Z")

</div>

I have a fork of the main branch. I didn’t use the command, since I was already testing some modifications, I hard-coded my user\_id app.py [(l777).](https://github.com/Roussman/repo2docker/blob/d3d815e541d547ef92900fa76c82040790eba2c8/repo2docker/app.py#L777)

---

<div class="post-metadata">

**Author:** ![Roussman](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/roussman/32/17924_2.png) [@Roussman](https://discourse.jupyter.org/u/Roussman)\
**Post date:** [March 17, 2025, 3:01pm UTC](https://discourse.jupyter.org/t/use-repo2docker-container-with-singularoty/33770/8 "2025-03-17T15:01:48Z")

</div>

I solved my issue by adding this chmod in the appendix option. Thank you for your help !
