Skip to content
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 mambaforge installer #22

Merged
merged 3 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# lightgbm-ci-docker
This is the docker for LightGBM CI

This project is used to build container images that can be used to test LightGBM in operating systems not supported by continuous integration services.
2 changes: 2 additions & 0 deletions dockers/ubuntu-14.04/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!start_azure.sh
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding a .dockerignore isn't strictly necessary to add support for mamba, but I think it's generally a good idea and thought now was a good time, given that we're about to test this new image anyway.

For details on this file, you can see https://codefresh.io/docker-tutorial/not-ignore-dockerignore-2/.

Benefits:

  • smaller build context = faster builds
  • reduced risk of accidentally including unnecessary files
    • smaller images
    • less risk of including secret / sensitive information

17 changes: 8 additions & 9 deletions dockers/ubuntu-14.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,15 @@ RUN curl -sLk https://sourceforge.net/projects/swig/files/swig/swig-4.0.2/swig-4
&& rm swig.tar.gz \
&& rm -rf swig-4.0.2

# Install Miniconda
RUN curl -sL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh \
&& chmod +x miniconda.sh \
&& ./miniconda.sh -b -p /opt/conda \
&& rm miniconda.sh \
&& /opt/conda/bin/conda install python=3 -q -y \
&& /opt/conda/bin/conda clean -a -y \
&& chmod -R 777 /opt/conda
# Install mamba[forge]
RUN curl -sL "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-$(uname -m).sh" -o mambaforge.sh \
&& chmod +x mambaforge.sh \
&& ./mambaforge.sh -b -p /opt/mamba \
&& rm mambaforge.sh \
&& /opt/mamba/bin/conda clean -a -y \
&& chmod -R 777 /opt/mamba

ENV CONDA=/opt/conda/
ENV CONDA=/opt/mamba/

# Clean system
RUN apt-get clean \
Expand Down