SCope icon indicating copy to clipboard operation
SCope copied to clipboard

Deploying Docker files on a VM

Open FloWuenne opened this issue 3 years ago • 5 comments

Hi there,

thank you very much for developing SCOPE and making it available via so many different ways (macOS, linux, Windows, Docker).

I was trying to set up a SCOPE instance on a Ubuntu 20.04.2 LTS Virtual machine running Docker.

I did the following:

git clone https://github.com/aertslab/SCope.git
cd SCope

sudo docker-compose build --build-arg SCOPE_PORT=8080

The build worked without problems, but when I try the following:

sudo docker-compose up -d

I get the following error:

Removing scope_scope_1
Recreating d15c85bccfaa_scope_scope_1 ... error

ERROR: for d15c85bccfaa_scope_scope_1  Cannot start service scope: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"bash /app/start.sh\": stat bash /app/start.sh: no such file or directory": unknown

ERROR: for scope  Cannot start service scope: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"bash /app/start.sh\": stat bash /app/start.sh: no such file or directory": unknown
ERROR: Encountered errors while bringing up the project.

I am not so familiar with docker-compose and have no starting point to troubleshoot this.

My final goal was to run SCope via Shinyproxy (https://shinyproxy.io/) and spin up containers for each user that wants to look at data.

Thanks for your help!

Florian

FloWuenne avatar Mar 05 '21 19:03 FloWuenne

Hi Florian,

It looks like you're not defining the SCOPE_DATA_DIR when you run the docker-compose command. You need to be running something like this line from the README: SCOPE_DATA_DIR=$HOME/scope_data SCOPE_PORT=8080 docker-compose up -d, if you don't provide this environment variable, docker tries to bind a folder which doesn't exist.

To your second point about Shinyproxy, keep in mind that SCope is not a shiny app, nor is it even R code. I have never used Shinyproxy, but from a quick look at their website, it seems specific to R/Shiny apps.

SCope does allow multiple users to use the same instance, for example https://scope.aertslab.org/ . Users can get a 5 day session at will, or permanent sessions can be added to SCope (which don't expire) using the Permanent_Session_IDs.txt file with a session name and ro/rw (depending on permissions wanted) seperated by a tab.

Hopefully this helps!

Cheers,

Kris

KrisDavie avatar Mar 06 '21 11:03 KrisDavie

Hi @KrisDavie,

thank you for the quick reply, it is really appreciated!

In fact, I had tried the docker-compose command as shown in the README as well and it gives the same error. I just retried it, using exactly the same paths as you suggested (a folder called scope_data in my home) and I get the same error:

SCOPE_DATA_DIR=$HOME/scope_data SCOPE_PORT=8001 docker-compose up -d 

Removing scope_scope_1
Recreating d15c85bccfaa_scope_scope_1 ... error

ERROR: for d15c85bccfaa_scope_scope_1  Cannot start service scope: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"bash /app/start.sh\": stat bash /app/start.sh: no such file or directory": unknown

ERROR: for scope  Cannot start service scope: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"bash /app/start.sh\": stat bash /app/start.sh: no such file or directory": unknown
ERROR: Encountered errors while bringing up the project.

Do you have any other ideas what might be causing this issue while trying to up the docker?

Thank you again!

Regarding Shinyproxy: I understand that I can host Scope by itself and I might do that instead. The use of Shinyproxy was mainly because it is already set up and running on the VM. It can actually be used to host any type of Docker container, even those using docker-compose. I am using Shinyproxy to run different instances of CellXGene for example and it works great for that. It spins up an isolated container for each user that connects.

FloWuenne avatar Mar 06 '21 13:03 FloWuenne

Hey @FloWuenne,

Ok, can you confirm that the folder $HOME/scope_data/ actually exists on the host system for the user that you're running the docker container with?

Can you also try starting the scope container manually, then entering it with docker exec -it scope bash and then run ls /app/ in that shell? (instructions here: https://docs.docker.com/engine/reference/commandline/exec/)

Ah, interesting about shinyproxy, in that case it should work assuming you get a unique set of ports mapped to each instance (unless they have unique IP addresses).

Cheers,

Kris

KrisDavie avatar Mar 08 '21 08:03 KrisDavie

Thanks again for the additional suggestions!

  1. The folder $HOME/scope_data/ does exist and is accessible by the SCope user.

I tried running the container using:

sudo docker run scope_scope

however, the container started by this, seems to exit automatically, since it is only visible via sudo docker container ls -a and shows as STATUS "exited".

I then tried: sudo docker run --name scope_bash --rm -i -t scope_scope bash and this did spin up a bash session inside the container. Checking contents of /app then from inside the bash session:

sudo docker run --name scope_bash --rm -i -t scope_scope bash
(scope) root@0345dc80a7cc:/app/opt# ls /app/
AUTHORS       VERSION		config_devVM.json	 index.html	    scope-json-metadata.schema.json  tutorials
CHANGELOG.md  apache		debian.json		 index.js	    scope-json-metadata.test.json    webpack.config.js
Dockerfile    assets		docker-compose.host.yml  node_modules	    scope_data
LICENSE       bin		docker-compose.yml	 opt		    src
README.md     compile_proto.sh	docs			 package-lock.json  start.sh
Singularity   config.json	images			 package.json	    tsconfig.json

FloWuenne avatar Mar 08 '21 15:03 FloWuenne

Hello, I have the same issue. I go inside the docker container and I try to start it with bash /app/start.sh and I obtain: [Errno 2] No such file or directory: b'/bin/alembic'

Studyfranco

studyfranco avatar Jul 21 '21 16:07 studyfranco