Closed qiyubio closed 1 month ago
I will sugest to change the installation location to /opt/r-miniconda for more general usage:
# set up miniconda path
RUN mkdir -p /opt/r-miniconda
ENV RETICULATE_MINICONDA_PATH=/opt/r-miniconda
# Install Miniconda using reticulate
RUN /bin/sh -c 'R -e "reticulate::install_miniconda(path=\"/opt/r-miniconda\")"'
RUN /bin/sh -c R -e "pak::pkg_install('drieslab/Giotto')"
# Create the giotto_env environment
RUN /bin/sh -c 'R -e "Giotto::installGiottoEnvironment(force_environment = TRUE)"'
ENV export RETICULATE_PYTHON=/opt/r-miniconda/envs/giotto_env/bin/python
@qiyubio I have not been able to reproduce your error. When I run
singularity pull suite.sif docker://giottopackage/suite:v4.1.0
singularity exec suite.sif R
library(Giotto) checkGiottoEnvironment()
I get:
library(Giotto) Loading required package: GiottoClass Giotto Suite 4.1.0 checkGiottoEnvironment() giotto environment found at /hpc/users/chavej12/.local/share/r-miniconda/envs/giotto_env/bin/python [1] TRUE
@qiyubio I just updated the image using your suggested changes.
You can find it using singularity pull suite.sif docker://giottopackage/suite:latest
Now it shows:
checkGiottoEnvironment() giotto environment found at /hpc/users/chavej12/.local/share/r-miniconda/envs/giotto_env/bin/python /opt/r-miniconda/envs/giotto_env/bin/python [1] TRUE
Let me know if it solves the problem.
Thanks for fixing it so quickly! @ josschavezf It works fine now on our cluster.
singularity exec suite.sif R
> library(Giotto)
Loading required package: GiottoClass
Newer devel version of GiottoClass on GitHub: 0.3.5
Giotto Suite 4.1.0
>
> checkGiottoEnvironment()
giotto environment found at
/opt/r-miniconda/envs/giotto_env/bin/python
[1] TRUE
I think there is a typo (extra = between export and RETICULATE_PYTHON), but not sure if it could make any damage, just fyi.
ENV export=RETICULATE_PYTHON=/opt/r-miniconda/envs/giotto_env/bin/python
https://hub.docker.com/layers/giottopackage/suite/latest/images/sha256-dce96c35bba7bf022f775b5d11d51dd42819e8f9c96415490fb58cf1ea4e2fd9?context=explore
Noted, thanks for your feedback!
Describe the Error
The miniconda installed by default is /root/.local/share/r-miniconda/. When pulled by singularity (which do not support root), the miniconda env is lost.
...
Error Message
To Reproduce
Steps to reproduce the behavior, i.e.:
singularity pull suite.sif docker://giottopackage/suite:v4.1.0
singularity exec suite.sif R
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem. NOTE: Screenshots of the attempted function call and full error message(s) are helpful for troubleshooting!
System Information
Please replace the following according to your machine:
Additional context
Add any other context about the problem here.