forked from GEO-BON/bon-in-a-box-pipelines
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Se agrego mvtnorm en el step de camptrap_format
- Loading branch information
Showing
6 changed files
with
119 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
FROM condaforge/mambaforge | ||
|
||
ADD ./r-environment.yml /data/r-environment.yml | ||
|
||
WORKDIR /data | ||
|
||
RUN mamba init | ||
|
||
# Since we are using the user from the client computer to run the scripts, | ||
# we need to create and open the permissions of a few files/directories. | ||
RUN chmod a+w /data | ||
|
||
COPY .condarc /.condarc | ||
RUN chmod 777 /.condarc | ||
|
||
# Conda cache and environments folder will be replaced by a virtual volume, but we want them to be writable by the runtime user. | ||
# Permissions cannot be defined at mount time, hence we create empty folder with the appropriate permissions. | ||
RUN mkdir /.cache && mkdir /.cache/conda && chmod a+w /.cache/conda | ||
RUN mkdir /.conda && chmod a+w /.conda | ||
RUN mkdir /r-libs-user && chmod a+w /r-libs-user | ||
RUN mkdir /conda-env-yml && chmod a+w /conda-env-yml | ||
|
||
# Initialize mamba when logging in with bash | ||
RUN echo 'eval "$(conda shell.bash hook)"; source /opt/conda/etc/profile.d/mamba.sh' > /.bashrc && chmod a+x /.bashrc | ||
|
||
# Allow to read bashrc to execute mamba init when using docker exec | ||
# See https://stackoverflow.com/a/74017557/3519951 | ||
RUN sed -e '/[ -z "$PS1" ] && return/s/^/#/g' -i /root/.bashrc | ||
|
||
RUN mamba env create -f /data/r-environment.yml | ||
|
||
# Hide "error libmamba Could not open lockfile '/opt/conda/pkgs/cache/cache.lock'" when installing manually with non-root user | ||
# That error would not prevent the correct installation, but it looked like it to the user. | ||
RUN chmod -R 777 /opt/conda/pkgs/cache | ||
|
||
|
||
# These packages are not in conda-forge | ||
# ADD CRAN PACKAGES HERE | ||
RUN bash --login -c "mamba activate rbase; R -e 'install.packages(c(\"CoordinateCleaner\", \ | ||
\"geodata\", \ | ||
\"OpenStreetMap\"\ | ||
), repos=\"https://cloud.r-project.org/\")'" | ||
|
||
|
||
|
||
# ADD GITHUB PACKAGES HERE | ||
RUN bash --login -c "mamba activate rbase; R -e 'devtools::install_github(\"ReseauBiodiversiteQuebec/stac-catalogue\")'" | ||
RUN bash --login -c "mamba activate rbase; R -e 'devtools::install_github(\"connectscape/Makurhini\")'" | ||
|
||
RUN date +"%Y-%m-%d %R" > /version.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: rbase | ||
channels: | ||
- conda-forge | ||
- r | ||
dependencies: | ||
- conda-build | ||
- libgdal | ||
- r-abind | ||
- r-base | ||
- r-curl | ||
- r-devtools | ||
- r-dismo | ||
- r-downloader | ||
- r-enmeval | ||
- r-essentials | ||
- r-gdalcubes | ||
- r-gdalutilities | ||
- r-gdalutils | ||
- r-ggsci | ||
- r-rjava | ||
- r-jpeg | ||
- r-landscapemetrics | ||
- r-png | ||
- r-rcurl | ||
- r-rgbif | ||
- r-rjson | ||
- r-rredlist | ||
- r-rstac | ||
- r-sf | ||
- r-stars | ||
- r-terra | ||
- r-tidyselect | ||
- r-unmarked | ||
- r-magrittr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters