Open JasonJWilliamsNY opened 5 years ago
I've tried to change the working directory, with setwd() and manually in Session ->Set Working Directory -> Choose Directory..., and it does not solve the problem. So I dug a little deeper. When you enter the docker container, you are in the /docker-persistant/dcuser directory. If you change where the docker container is set to initiate, that will adjust the RStudio home directory problem.
I haven't tried to fix this -
The way the container starts now is the script initiate.sh
is run so that inside container the dcuser account is created a well as a home folder. A fix would be to create dcuser
on the VM itself (however this means someone trying to run the container on their own computer would have to know how to do this).
If you run the bash terminal in R you will see your location as /home/dcuser (same if you ssh into the shell). From what I have read, RStudio does not follow the symbolic link.
It's not a horrible thing, but would be nice if you do find a way to fix.
After you connect to the docker container you are in the /home/dcuser directory. However, that is not where the RStudio working directory is set. The RStudio working directory is set to /docker-persistant. I have written code(below) that, if added to the beginning of the initiate.sh, could fix the problem (though I couldn't test it out since permission was denied).
cd ../..
mkdir dcuser mkdir home mkdir docker_genomics_r
mv docker-persistant dc_genomics_r/
mv dc_genomics_r dcuser/
mv dcuser home/
Hi @aortiz24 - you should be able to test your code - if you are working on the Atmosphere instance, you have sudo permission (your sudo password is the same as your docker password). You can also clone this repo and pull the docker image from docker hub (docker pull jasonjwilliamsny/dc_genomics:dev_1.8) to test things locally. I am not sure this code can work because docker-persistant
is folder that should exist outside the docker container and is mounted when docker starts the dc_genomics container (using the -v
(volume) option). It could perhaps be possible to do some thing like -v /docker-persistant:/home/dcuser
(and some fixes in initiate.sh
)but I have never tried!
Currently: `
Would be nice if that was
/home/dcuser/dc_genomics_r
./home/dcuser
is a symbolic link to/docker-persistant/dcuser
, so need to find out how to fix this.