Skip to content

Installing the SCTK Shiny app on a server

Joshua D. Campbell edited this page Mar 9, 2022 · 2 revisions

Installation on Linux server

The Docker image contain the singleCellTK installation and Shiny app is located here.

Step 1:

Check if the docker is installed on server by using following command:

docker -v

Step 2:

If the docker is not installed then install it on server by using following command else skip this step:

sudo snap install docker

Step 3:

Check if the docker service is running by using following command:

sudo service docker status

Step 4:

If the docker service is not running then run it by using following command else skip this step:

sudo snap start docker

Step 5:

Now it's time to take image pull from docker hub by using following command:

docker pull campbio/sctk_shiny:v2.0.2

Note: If you get permission denied error from server then use following command to grant required permission to docker and repeat Step 5:

sudo chmod 666 /var/run/docker.sock\

Step 6:

Once the docker image is pulled from docker hub then check the list of images on server by using following command:

docker images

This will list down all the available docker images on server.

Step 7:

Run the docker image by using following command:

docker run -d -p 3838:3838 campbio/sctk_shiny:v2.0.2

Note: The version name after the colon is the tag of docker image. If there is a new image then please use the latest tag name. On running this command successfully, shiny app can be accessed by using domain name or server ip address. If there is any error of missing dependency then please install the missing dependency and follow step 7 again. If needed, the following command can be used to install httpd Apache (and follow step 7 again):

sudo snap install httpd

Step 8 (Final Step):

Once the docker container starts running, configure it to restart automatically as the docker container will stop running on app crash and shiny app will no longer be available for users. Following command will list down all running containers.

docker ps -a

Copy the container id and use following command to configure it for auto restart.

docker update --restart unless-stopped CONTAINER_ID_HERE

Now the shiny app is running on your server!