Skip to content

Add documentation on using Singularity #9

@enasca

Description

@enasca

In preparation of switching from Docker to Singularity Apptainer, I'd like to create a document containing a few Docker use cases and their Singularity equivalent. All of the listed examples should be things that we've tried on the cluster.

  • Becoming a regular user.
    • Are files created in the container owned by you on the host?
    • Does the user retain its username, UID and primary GID in the container?
    • Is it possible to bind-mount project directories at any level (e.g. /projects/myproject/mydir)?
  • Becoming root.
    • Are files created in the container owned by you on the host?
    • Can you do things such as installing packages in the container?
  • Launching a server application
    • How to launch it with the default parameters?
    • How to map the container port to a different host port?
  • Putting two or more containers in communication
    • Do we need to expose a port on the host? For example, by launching a server with
      docker network create mynetwork
      docker run --name myserver --network mynetwork nginx
      a client container can contact it by joining the same network, with no ports exposed on the host:
      docker run --name myclient --network mynetwork curlimages/curl http://myserver
  • Using GPUs
    • If we request one or more GPUs via slurm, do we get them in Singularity too?
  • Dockerfiles
    • What if users want to build local Dockerfiles? Maybe we can provide a registry so that people can build+push from their own machine and then use the image with Apptainer.
  • Docker Compose files

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