Skip to content

Releases: RESTGroup/rest_workspace

Containerization Support

03 Dec 09:27

Choose a tag to compare

We are excited to announce that the program now supports containerization. A Dockerfile is provided, enabling users to easily build and deploy the REST service using Docker. This addition simplifies the setup process and ensures consistent environments across different systems.

How to Use Dockerfile:

  1. Make sure you have installed Docker

  2. Download the Dockerfile:

    • Download the attached Dockerfile to your local machine.
  3. Build the Docker Image:

    • Navigate to the directory containing the Dockerfile.
    • Run the following command to build the Docker image:
      (Run about 30min)
      docker build -t rest/x86:0.1 .
  4. Run the Docker Container:

    • After building the image, you can run the container with a local folder mounted by using:
      docker run -d -v /path/to/local/folder:/path/in/container rest/x86:0.1
    • Replace /path/to/local/folder with the path to the local directory you want to mount and /path/in/container with the desired path inside the container.
    • This will start the service with the local folder mounted, allowing you to interact with the container’s filesystem.

How to Use Singularity:

  1. Convert to Singularity Image:

    • To convert the Docker image to a Singularity image, follow one of the two methods below:

    Option 1: Using docker-daemon

    • Run the following command:
      singularity build rest_x86_0.1.sif docker-daemon://rest/x86:0.1

    Option 2: Export Docker Image to a TAR file

    • Export the Docker image to a TAR file:
      docker save -o rest_x86_0.1.tar rest/x86:0.1
    • Build the Singularity image from the TAR file:
      singularity build rest_x86_0.1.sif docker-archive://rest_x86_0.1.tar
  2. Run the Singularity Container:

    • Once the Singularity image is built, you can run it with:
      singularity exec --bind /path/to/local:/path/in/container rest_x86_0.1.sif bash -c "rest"