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

made Dockerfile singularity/apptainer compatible #3344

Closed

Conversation

thawn
Copy link

@thawn thawn commented Aug 2, 2024

On HPC systems, singularity/apptainer is used instead of docker as the container solution.

The current dockerfile does not work under singularity, since nerfstudio is installed under /home/user, which is not accessible when the container is run in singularity/apptainer. The problem is that under singularity, the user inside the container has the same rights as outside the container and thus cannot access the contents of the folder belonging to another user. This makes singularity containers secure to use in a multi-user environment.

The proposed changes install nerfstudio in the system environment, making it available to all users.

I have tested this container with singularity3.11 on an HPC system and it works. The container is available on https://hub.docker.com/repository/docker/thawn/nerfstudio
closes #2952

On HPC systems, singularity/apptainer is used instead of docker as the container solution.

The current dockerfile does not work under singularity, since nerfstudio is installed under /home/user, which is not accessible when the container is run in singularity/apptainer. The problem is that under singularity, the user inside the container has the same rights as outside the container and thus cannot access the contents of the folder belonging to another user. This makes singularity containers secure to use in a multi-user environment.

The proposed changes install nerfstudio in the system environment, making it available to all users.

I have tested this container and it works. The container is available on hub.docker.com/thawn/nerfstudio

closes nerfstudio-project#2952
@brentyi
Copy link
Collaborator

brentyi commented Aug 3, 2024

Could you comment on the relationship between these changes and #3283? (cc @jkulhanek)

@thawn
Copy link
Author

thawn commented Aug 3, 2024

@brentyi
after a cursory look into #3283 it looks to me like that pull request would also solve the issues with apptainer.
In addition, it adds some nice features like an automatic build action.

Furthermore, #3283 has already been extensively reviewed.

Therefore, I am closing this pull request in favor of #3283.

@thawn thawn closed this Aug 3, 2024
@thawn
Copy link
Author

thawn commented Aug 3, 2024

Fingers crossed for getting #3283 merged soon 🤞

@thawn
Copy link
Author

thawn commented Aug 3, 2024

I am keeping my fork and branch until #3283 has been merged and tested.

@jkulhanek
Copy link
Contributor

Sorry, I was on a vacation. Can you try to pull the image compiled from #3283 if it works with apptainer?

@thawn
Copy link
Author

thawn commented Aug 23, 2024

@jkulhanek thanks for your excellent work on #3283 . I pulled docker://ghcr.io/nerfstudio-project/nerfstudio:pr-3283 with singularity and it works well 👍

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.

Docker/singularity container doesn't seem to contain ns-* commands
3 participants