Install Docker & Run STAR SW Container - Scientific Linux
Install Docker & Run STAR Container - Scientific Linux
These instructions are provided for you to install Docker-CE on your Linux machine & pull and run the SL7 based STAR container. The instructions assume your have CVMFS installed and configured - https://drupal.star.bnl.gov/STAR/blog/mpoat/how-install-cvmfs-and-mount-bnlstar-repo . While CVMFS is not required to install/run the docker container, you will need it to run ROOT4STAR.
1. Install the docker-ce yum repo
# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
2. Install docker packages
# yum install docker-ce docker-ce-cli containerd.io
3. Start the docker service
# systemctl start docker.service
4. List current running containers
(This won't show any containers running at this time, but if the command returns than you know docker-ce is installed/running properly)
# docker ps
5. Pull the Docker image from the STAR Collaboration Docker Hub
# docker pull starcollaboration/star_sw:v1
6. List the Docker Image (Image is 1.19GB compressed)
# docker image ls
7. Run the docker container with CVMFS bind mounted (use –v option)
You can replace '-v /data:/data' with '-v /home/[user] /home[user]' where [user] is your username. This will mount your home directory inside the container# docker run --rm --name=star_sw -dt -v /cvmfs:/cvmfs –v /data:/data starcollaboration/star_sw:v1
8. Enter into the Docker container (default user is staruser)
Note: Their is a default user account: 'staruser' that will run when you execute the command below (this account will also load the STAR environment)You can can '--user=root' before /bin/csh and you will execute your shell as the root user
# docker exec –it star_sw /bin/csh
9. Run root4star
> root4star
10. To Stop and remove the container, exit out of the interactive shell and enter:
# docker stop star_sw
Groups:
- mpoat's blog
- Login or register to post comments