Code Monkey home page Code Monkey logo

docker-rstudio-notebook's Introduction

Docker RStudio Container

RStudio running in a docker container. This image can be used to integrate RStudio into Galaxy through the Interactive Tools mechanism.

A variety of different packages are pre-installed and can be used right away.

Cloning the repository

This repository has submodules, please clone recursively:

git clone --recursive https://github.com/hexylena/docker-rstudio-notebook

Build-Time Variables

Variable Use
RSTUDIO_FULL Build RStudio with the full complement of Bio packages (warning, slow)

Run-Time Variables

Variable Use
GALAXY_WEB_PORT Port on which Galaxy is running, if applicable
CORS_ORIGIN If the notebook is proxied, this is the URL the end-user will see when trying to access a notebook
DOCKER_PORT Used in Galaxy Interactive Environments to ensure that proxy routes are unique and accessible
API_KEY Galaxy API Key with which to interface with Galaxy
HISTORY_ID ID of current Galaxy History, used in easing the dataset upload/download process
REMOTE_HOST Unused
GALAXY_URL URL at which Galaxy is accessible
DEBUG Enable debugging mode, mostly for developers

Licence (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

docker-rstudio-notebook's People

Contributors

bgruening avatar dannon avatar hexylena avatar mvdbeek avatar nturaga avatar scholtalbers avatar shiltemann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

docker-rstudio-notebook's Issues

Building the image fails

Hello
When I am trying to build the image with docker build ., it fails with the following error:

Step 13/19 : RUN Rscript /tmp/packages/gx.R
---> Running in c39e91136475
Loading required package: usethis
Error: Could not find package root, is your working directory inside a package?
Execution halted
The command '/bin/sh -c Rscript /tmp/packages/gx.R' returned a non-zero code: 1

Did I miss something, some environment parameter to set?

Some error when you render the new MD files

I'm not sure this is our fault, but documenting it here. Maybe someone has an idea.

ERROR: PermissionDenied: Permission denied (os error 13)

PermissionDenied: Permission denied (os error 13)
    at makeTempDirSync (deno:runtime/js/30_fs.js:80:16)
    at file:///usr/lib/rstudio-server/bin/quarto/bin/quarto.js:5958:29
    at withAttempts (file:///usr/lib/rstudio-server/bin/quarto/bin/quarto.js:5917:20)
    at Object.makeTempDirSync (file:///usr/lib/rstudio-server/bin/quarto/bin/quarto.js:5958:12)
    at initSessionTempDir (file:///usr/lib/rstudio-server/bin/quarto/bin/quarto.js:47815:20)
    at quarto (file:///usr/lib/rstudio-server/bin/quarto/bin/quarto.js:127537:5)
    at file:///usr/lib/rstudio-server/bin/quarto/bin/quarto.js:127557:15
``

rstudio `gx_get()` /import Permission Error

Hello,

I upgraded to 19.05 today and have been testing the Rstudio GIE running. It actually works flawlessly out of the box with one exception: whenever I try to use gx_get(), I get a permission error like this:

> gx_get(1)
Traceback (most recent call last):
  File "/usr/local/bin/get", line 18, in <module>
    print( get( args.id, args.identifier_type, args.history_id ) )
  File "/usr/local/lib/python2.7/dist-packages/galaxy_ie_helpers/__init__.py", line 139, in get
    dc.download_dataset(datasets[dataset_identifier], file_path=file_path, use_default_filename=False)
  File "/usr/local/lib/python2.7/dist-packages/bioblend/galaxy/datasets/__init__.py", line 128, in download_dataset
    with open(file_local_path, 'wb') as fp:
IOError: [Errno 13] Permission denied: '/import/1'
[1] "/import/1"

When looking at the permissions in the /import, it's easy to see why, everything is owned by root, despite the working user being rstudio, and world write is not allowed. gx_put() does work if I make a file and try to send it to galaxy.

I have Galaxy setup to use an external machine as a container runner and thus have the use_volumes option in the .ini set to false. Jupyter does work well here and is able to do both get and put.

It seems to stem from the Dockerfile defining the /import directory as a volume and those, by default, seem to be owned by root if another pre-made volume is not defined (which I would rather not do for easier maintenance).

I was wondering if you know any workaround to get this to work so we can just use the default configuration and image?

Thanks you!

Many /monitor_traffic.sh processes after user has left

Opening an issue for now as I don't have much time to debug more
Today I discovered >6000 /monitor_traffic.sh processes were running on the server where rstudio GIE are launched. I had to kill the rstudio container that was running since yesterday.
I think the problem is that:

  • The user launches the rstudio GIE, and everything goes well
  • Then he leaves, and monitor_traffic should see it and kill the container somehow
  • It doesn't get killed, and every 4 minutes, a new monitor_traffic.sh is launched, while rm: cannot remove '/import/': Device or resource busy appears in the container log

So I guess we should change this line, but I haven't tested yet

Can't install package using mamba

Hello,

Was trying out installing an R package in Galaxy EU RStudio terminal, following the instructions in the RStudio console mamba install package, but it didn't work with mamba (conda seems to work, or at least get further). Should I be able to install using mamba?

(base) rstudio@5ae69c5d7494:~$ mamba install bioconductor-mageckflute

                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (0.15.2) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████


Looking for: ['bioconductor-mageckflute']

conda-forge/linux-64     [<=>                 ] (00m:00s) 15  B / ?? (42.00  B/s)
conda-forge/noarch       [<=>                 ] (00m:00s) 15  B / ?? (42.00  B/s)
bioconda/linux-64        [<=>                 ] (00m:00s) 15  B / ?? (42.00  B/s)
bioconda/noarch          [<=>                 ] (00m:00s) 15  B / ?? (42.00  B/s)
ERROR   Could not open file for download /data/dnb03/galaxy_db/job_working_directory/034/556/34556106/tmp/mambafpMraRzhVSy: Permission denied
(base) rstudio@5ae69c5d7494:~$ conda install bioconductor-mageckflute
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /opt/miniconda

  added / updated specs:
    - bioconductor-mageckflute


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    bioconductor-clusterprofiler-4.0.0|    r41hdfd78af_0         693 KB  bioconda
    bioconductor-do.db-2.9     |   r41hdfd78af_11           8 KB  bioconda
    bioconductor-dose-3.18.0   |    r41hdfd78af_0         6.4 MB  bioconda
    bioconductor-enrichplot-1.12.0|    r41hdfd78af_0         277 KB  bioconda
    bioconductor-fgsea-1.18.0  |    r41h399db7b_0         1.4 MB  bioconda
    bioconductor-ggtree-3.0.1  |    r41hdfd78af_0         825 KB  bioconda
    bioconductor-go.db-3.13.0  |    r41hdfd78af_0           8 KB  bioconda
    bioconductor-gosemsim-2.18.0|    r41h399db7b_0         904 KB  bioconda
    bioconductor-mageckflute-1.12.0|    r41hdfd78af_0        13.3 MB  bioconda
    bioconductor-qvalue-2.24.0 |    r41hdfd78af_0         2.7 MB  bioconda
    bioconductor-treeio-1.16.1 |    r41hdfd78af_0         802 KB  bioconda
    ca-certificates-2021.10.8  |       ha878542_0         139 KB  conda-forge
    certifi-2021.10.8          |   py39hf3d152e_1         145 KB  conda-forge
    conda-4.10.3               |   py39hf3d152e_3         3.1 MB  conda-forge
    r-ape-5.5                  |    r41h306847c_0         3.1 MB  conda-forge
    r-aplot-0.1.1              |    r41hc72bb7e_0          61 KB  conda-forge
    r-downloader-0.4           | r41hc72bb7e_1003          34 KB  conda-forge
    r-fastmatch-1.1_3          |    r41hcfec24a_0          47 KB  conda-forge
    r-ggforce-0.3.3            |    r41h03ef668_0         1.9 MB  conda-forge
    r-ggfun-0.0.4              |    r41hc72bb7e_0         137 KB  conda-forge
    r-ggplotify-0.1.0          |    r41hc72bb7e_0         153 KB  conda-forge
    r-ggraph-2.0.5             |    r41h03ef668_0         3.9 MB  conda-forge
    r-graphlayouts-0.7.1       |    r41h03ef668_0         2.4 MB  conda-forge
    r-gridgraphics-0.5_1       |    r41hc72bb7e_0         262 KB  conda-forge
    r-rvcheck-0.2.1            |    r41hc72bb7e_0          41 KB  conda-forge
    r-scatterpie-0.1.6         |    r41hc72bb7e_0         359 KB  conda-forge
    r-shadowtext-0.0.9         |    r41hc72bb7e_0         246 KB  conda-forge
    r-tidygraph-1.2.0          |    r41h03ef668_0         526 KB  conda-forge
    r-tidytree-0.3.6           |    r41hc72bb7e_0         273 KB  conda-forge
    r-tweenr-1.0.2             |    r41h03ef668_0         344 KB  conda-forge
    r-yulab.utils-0.0.4        |    r41hc72bb7e_0          35 KB  conda-forge
    ------------------------------------------------------------
                                           Total:        44.3 MB

The following NEW packages will be INSTALLED:

  bioconductor-clus~ bioconda/noarch::bioconductor-clusterprofiler-4.0.0-r41hdfd78af_0
  bioconductor-do.db bioconda/noarch::bioconductor-do.db-2.9-r41hdfd78af_11
  bioconductor-dose  bioconda/noarch::bioconductor-dose-3.18.0-r41hdfd78af_0
  bioconductor-enri~ bioconda/noarch::bioconductor-enrichplot-1.12.0-r41hdfd78af_0
  bioconductor-fgsea bioconda/linux-64::bioconductor-fgsea-1.18.0-r41h399db7b_0
  bioconductor-ggtr~ bioconda/noarch::bioconductor-ggtree-3.0.1-r41hdfd78af_0
  bioconductor-go.db bioconda/noarch::bioconductor-go.db-3.13.0-r41hdfd78af_0
  bioconductor-gose~ bioconda/linux-64::bioconductor-gosemsim-2.18.0-r41h399db7b_0
  bioconductor-mage~ bioconda/noarch::bioconductor-mageckflute-1.12.0-r41hdfd78af_0
  bioconductor-qval~ bioconda/noarch::bioconductor-qvalue-2.24.0-r41hdfd78af_0
  bioconductor-tree~ bioconda/noarch::bioconductor-treeio-1.16.1-r41hdfd78af_0
  r-ape              conda-forge/linux-64::r-ape-5.5-r41h306847c_0
  r-aplot            conda-forge/noarch::r-aplot-0.1.1-r41hc72bb7e_0
  r-downloader       conda-forge/noarch::r-downloader-0.4-r41hc72bb7e_1003
  r-fastmatch        conda-forge/linux-64::r-fastmatch-1.1_3-r41hcfec24a_0
  r-ggforce          conda-forge/linux-64::r-ggforce-0.3.3-r41h03ef668_0
  r-ggfun            conda-forge/noarch::r-ggfun-0.0.4-r41hc72bb7e_0
  r-ggplotify        conda-forge/noarch::r-ggplotify-0.1.0-r41hc72bb7e_0
  r-ggraph           conda-forge/linux-64::r-ggraph-2.0.5-r41h03ef668_0
  r-graphlayouts     conda-forge/linux-64::r-graphlayouts-0.7.1-r41h03ef668_0
  r-gridgraphics     conda-forge/noarch::r-gridgraphics-0.5_1-r41hc72bb7e_0
  r-rvcheck          conda-forge/noarch::r-rvcheck-0.2.1-r41hc72bb7e_0
  r-scatterpie       conda-forge/noarch::r-scatterpie-0.1.6-r41hc72bb7e_0
  r-shadowtext       conda-forge/noarch::r-shadowtext-0.0.9-r41hc72bb7e_0
  r-tidygraph        conda-forge/linux-64::r-tidygraph-1.2.0-r41h03ef668_0
  r-tidytree         conda-forge/noarch::r-tidytree-0.3.6-r41hc72bb7e_0
  r-tweenr           conda-forge/linux-64::r-tweenr-1.0.2-r41h03ef668_0
  r-yulab.utils      conda-forge/noarch::r-yulab.utils-0.0.4-r41hc72bb7e_0

The following packages will be UPDATED:

  ca-certificates                      2021.5.30-ha878542_0 --> 2021.10.8-ha878542_0
  certifi                          2021.5.30-py39hf3d152e_0 --> 2021.10.8-py39hf3d152e_1
  conda                               4.10.3-py39hf3d152e_0 --> 4.10.3-py39hf3d152e_3


Proceed ([y]/n)? y


Downloading and Extracting Packages
bioconductor-do.db-2 | 8 KB      | ##################################################### | 100% 
bioconductor-treeio- | 802 KB    | ##################################################### | 100% 
ca-certificates-2021 | 139 KB    | ##################################################### | 100% 
r-tweenr-1.0.2       | 344 KB    | ##################################################### | 100% 
r-ggfun-0.0.4        | 137 KB    | ##################################################### | 100% 
bioconductor-cluster | 693 KB    | ##################################################### | 100% 
r-fastmatch-1.1_3    | 47 KB     | ##################################################### | 100% 
r-ggraph-2.0.5       | 3.9 MB    | ##################################################### | 100% 
bioconductor-go.db-3 | 8 KB      | ##################################################### | 100% 
bioconductor-mageckf | 13.3 MB   | ##################################################### | 100% 
bioconductor-fgsea-1 | 1.4 MB    | ##################################################### | 100% 
r-ggplotify-0.1.0    | 153 KB    | ##################################################### | 100% 
bioconductor-dose-3. | 6.4 MB    | ##################################################### | 100% 
r-ape-5.5            | 3.1 MB    | ##################################################### | 100% 
r-aplot-0.1.1        | 61 KB     | ##################################################### | 100% 
conda-4.10.3         | 3.1 MB    | ##################################################### | 100% 
r-rvcheck-0.2.1      | 41 KB     | ##################################################### | 100% 
r-tidytree-0.3.6     | 273 KB    | ##################################################### | 100% 
r-shadowtext-0.0.9   | 246 KB    | ##################################################### | 100% 
r-scatterpie-0.1.6   | 359 KB    | ##################################################### | 100% 
r-downloader-0.4     | 34 KB     | ##################################################### | 100% 
bioconductor-ggtree- | 825 KB    | ##################################################### | 100% 
bioconductor-enrichp | 277 KB    | ##################################################### | 100% 
certifi-2021.10.8    | 145 KB    | ##################################################### | 100% 
r-ggforce-0.3.3      | 1.9 MB    | ##################################################### | 100% 
r-tidygraph-1.2.0    | 526 KB    | ##################################################### | 100% 
r-gridgraphics-0.5_1 | 262 KB    | ##################################################### | 100% 
r-graphlayouts-0.7.1 | 2.4 MB    | ##################################################### | 100% 
bioconductor-qvalue- | 2.7 MB    | ##################################################### | 100% 
bioconductor-gosemsi | 904 KB    | ##################################################### | 100% 
r-yulab.utils-0.0.4  | 35 KB     | ##################################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

RStudio integration wit Galaxy

Hi,

I am working on integration of Jupyter and RStudio into Galaxy (IE). I menage to integrate Jupyter and it works very well. I am having issues with RStudio.
Is there any "step-by-step" description for the integration?
My log file:

galaxy.web.base.interactive_environments INFO 2016-08-05 14:53:50,963 Starting docker container for IE rstudio with command [docker run --sig-proxy=true -e DEBUG=true -e DEFAULT_CONTAINER_RUNTIME=120 -e "GALAXY_URL=https://galaxy.medunigraz.at" -e "NOTEBOOK_USERNAME=galaxy" -e "CORS_ORIGIN=https://galaxy.medunigraz.at" -e "GALAXY_WEB_PORT=None" -e "HISTORY_ID=606f7a6aa0323b9d" -e "NOTEBOOK_PASSWORD=utb7y6j3fpfroph4s4yr06m0" -e "PROXY_PREFIX=/gie_proxy/rstudio" -e "API_KEY=b27201ca5ac4cc7e469c77f13ad05b91" -e "REMOTE_HOST=10.200.168.222" -e "[email protected]" -d -P -v "/home/data/galaxy_database/tmp/tmpBRM1ww:/import/"  erasche/docker-rstudio-notebook:16.01]
galaxy.web.base.interactive_environments ERROR 2016-08-05 14:53:51,734 99e0fa097795cd3d9d7ddc6e004f9a0de0b59d18dc9739665830e1756d3dc273

docker: Error response from daemon: oci runtime error: permission denied.

galaxy.webapps.galaxy.controllers.visualization ERROR 2016-08-05 14:53:51,734 error rendering visualization (rstudio): 'Bunch' object has no attribute 'proxy_url'
Traceback (most recent call last):

Any suggestion what can be wrong?

Thanks in advance.

Regards,
Marija

Upgrade to latest version

master and 16.01 have a version that's bumped to latest RStudio, but automatic login in galaxy is now broken. Sigh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.