New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add possibility to install from local Bioc mirror #31
Comments
Let's have the conversation here rather than the bioc-devel mailing list, where I said I'm not sure why this does not work. The key is BiocManager::repositories(), which determines the repositories where R looks for packages. R choose the first repository where it finds the package (maybe of equivalent version, not exactly sure...). The first argument to repositories() can be a site repository, so
The Bioc repositories themselves are based on getOption("BioC_mirror") and getOption("repos"), so
These can be file paths; we are just delegating to install.packages(). It sounds like this doesn't work, somehow for you. Can you elaborate? |
Thanks @mtmorgan for the quick feedback. It does indeed work on my notebook options(BioC_mirror = "file:///data/shared/bioinf/mirror/bioconductor")
BiocManager::repositories()
BioCsoft
"file:///data/shared/bioinf/mirror/bioconductor/packages/3.9/bioc"
BioCann
"file:///data/shared/bioinf/mirror/bioconductor/packages/3.9/data/annotation"
BioCexp
"file:///data/shared/bioinf/mirror/bioconductor/packages/3.9/data/experiment"
BioCworkflows
"file:///data/shared/bioinf/mirror/bioconductor/packages/3.9/workflows"
CRAN
"https://cloud.r-project.org"
sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin18.2.0/x86_64 (64-bit)
Running under: macOS 10.14.2
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] BiocManager_1.30.3
loaded via a namespace (and not attached):
[1] compiler_3.5.1 tools_3.5.1
but not on the cluster: > options(BioC_mirror = "file:///data/shared/bioinf/mirror/bioconductor")
> BiocManager::repositories()
Error: invalid version specification ‘Bioconductor version cannot be validated; no internet connection?’
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux buster/sid
Matrix products: default
BLAS: /shared/bioinf/R/R-3.5.1-BioC3.8/lib/R/lib/libRblas.so
LAPACK: /shared/bioinf/R/R-3.5.1-BioC3.8/lib/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] BiocManager_1.30.3 compiler_3.5.1 tools_3.5.1
It does also not help if I specify the version with Would be nice to have an option were internet connectivity is not required, e.g. if the |
OK, issue #32 biting us again! Does it help to use a system variable or option
|
Unfortunately not: > options(BIOCONDUCTOR_ONLINE_VERSION_DIAGNOSIS=FALSE)
> options(BioC_mirror = "file:///data/shared/bioinf/mirror/bioconductor")
> BiocManager::repositories()
Error: invalid version specification ‘Bioconductor version cannot be validated; no internet connection?’
> BiocManager::repositories(version = "3.8")
Error: Bioconductor version cannot be validated; no internet connection?
In addition: Warning message:
Bioconductor online version validation disabled; see
?BIOCONDUCTOR_ONLINE_VERSION_DIAGNOSIS
|
I am having the exact same issues as jotseung. rsync'd the repository according to https://bioconductor.org/about/mirrors/mirror-how-to/. The server in question is behind a firewall with no possibility of either opening the firewall port or setting up a http/https proxy. Any ideas when a work-around could be put into place to avoid requiring an internet connection> |
I think the work-around is to manually install BiocVersion from the appropriate Bioconductor repository, e.g., for Bioc 3.8 do the equivalent of
Then when BiocManager tries to validate version, it'll find that it doesn't have internet access but it does at least know what version is in use, and will go with that. |
That didn't seem to help. I installed BiocVersion from the tar.gz source but I still get
|
Hi @onealdw, |
1.30.4 |
Somewhat long script but I erased what I had already installed and tried from scratch. Again, this server is behind a firewall with no internet access. Also, I am a sysadmin, not a R expert, so please bear with me as I muddle my way through this. FYI, the system is running CentOS 7.5.
|
A work-around that let me install locally is to download |
Hi all, Essentially, there is no way to figure out what version corresponds to "devel" and One alternative is to try to guess "devel" by doing Another alternative is to modify / hard-code What are your thoughts Martin? @mtmorgan |
So next iteration @jotsetung @onealdw on the branch https://github.com/Bioconductor/BiocManager/tree/offline-version where I think
works when the BiocVersion package has been installed, and there is a local repository? |
Thanks @mtmorgan for the update! I just have to find a way to test that - took me some time to convince the system administrators to allow connections from the cluster to Bioconductor. I am afraid to tell them now to temporarily disable internet access again ... |
I can confirm that the version from the > options(BIOCONDUCTOR_ONLINE_VERSION_DIAGNOSIS=FALSE)
> library(BiocManager)
Bioconductor version 3.8 (BiocManager 1.30.4.9001), ?BiocManager::install for
help
Warning message:
Bioconductor online version validation disabled; see
?BIOCONDUCTOR_ONLINE_VERSION_DIAGNOSIS
> BiocManager::repositories()
BioCsoft
"file:///Volumes/jodata/mirror/bioconductor/packages/3.8/bioc"
BioCann
"file:///Volumes/jodata/mirror/bioconductor/packages/3.8/data/annotation"
BioCexp
"file:///Volumes/jodata/mirror/bioconductor/packages/3.8/data/experiment"
BioCworkflows
"file:///Volumes/jodata/mirror/bioconductor/packages/3.8/workflows"
CRAN
"file:///Volumes/jodata/mirror/CRAN/"
> BiocManager::install("BiocGenerics")
Bioconductor version 3.8 (BiocManager 1.30.4.9001), R 3.5.1 (2018-07-02)
Installing package(s) 'BiocGenerics'
Warning: failed to download mirrors file (cannot open URL 'https://cran.r-project.org/CRAN_mirrors.csv'); using local file '/Users/jo/R/2018-11/R-3.5.1-Bioc3.8/lib/R/doc/CRAN_mirrors.csv'
Warning message:
In download.file(url, destfile = f, quiet = TRUE) :
URL 'https://cran.r-project.org/CRAN_mirrors.csv': status was 'Couldn't resolve host name'
* installing *source* package ‘BiocGenerics’ ...
** R
** inst
** byte-compile and prepare package for lazy loading
Creating a new generic function for ‘append’ in package ‘BiocGenerics’
Creating a new generic function for ‘as.data.frame’ in package ‘BiocGenerics’
Creating a new generic function for ‘cbind’ in package ‘BiocGenerics’
Creating a new generic function for ‘rbind’ in package ‘BiocGenerics’
... |
I got the same problem because I use R on conda environment. I fixed it add file "cacert.pem" (in the anaconda environment) to R as follow. |
Anyone knows where I can find offline-version? |
The offline-version branch should be merged to master. You can download it by getting the latest development version here (version |
Sorry to bug again, but with the new version it seems to still fail: I installed R-3.6.0, and > options(BIOCONDUCTOR_ONLINE_VERSION_DIAGNOSIS = FALSE)
> library(BiocManager())
Bioconductor version 3.9 (BiocManager 1.30.4), ?BiocManager::install for help
Bioconductor version cannot be validated; no internet connection?
Error: package or namespace load failed for ‘BiocManager’:
.onAttach failed in attachNamespace() for 'BiocManager', details:
call: NULL
error: invalid version specification ‘Bioconductor version cannot be validated; no internet connection?’
In addition: Warning messages:
1: Bioconductor online version validation disabled; see
?BIOCONDUCTOR_ONLINE_VERSION_DIAGNOSIS
2: Bioconductor version cannot be validated; no internet connection?
> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux buster/sid
Matrix products: default
BLAS: /shared/bioinf/R/R-3.6.0-BioC3.9/lib/R/lib/libRblas.so
LAPACK: /shared/bioinf/R/R-3.6.0-BioC3.9/lib/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] BiocManager_1.30.4 compiler_3.6.0 tools_3.6.0
|
Hi Johannes, @jorainer Best, |
Thanks Marcel @LiNk-NY ! |
I just installed the version manually and with |
This has to be fixed soon. I got it installed by using @onealdw method. I installed in an offline environemnt by doing the following,
|
Thanks for your illustrative example. Offline installations are described Unfortunately, this whole process has been taking quite some time Best regards, |
Would it be possible to add the possibility to install Bioconductor from a local mirror? With
BiocInstaller
andbiocLite.R
it was possible to specify the mirror withoptions(BioC_mirror = "<url to mirror>")
but that does no longer work...The text was updated successfully, but these errors were encountered: