Unverified Commit 1862d7f5 authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[ci] use conda-forge in Windows CI jobs and Docker images (#4993)

* Update dockerfile-python

* Update README.md

* Update dockerfile.gpu

* Update dockerfile.gpu

* Update .vsts-ci.yml

* Update .appveyor.yml

* Update test_windows.ps1
parent 49a10c32
......@@ -38,5 +38,7 @@ install:
build: false
test_script:
- conda config --add channels conda-forge
- conda config --set channel_priority strict
- conda init powershell
- powershell.exe -ExecutionPolicy Bypass -File %APPVEYOR_BUILD_FOLDER%\.ci\test_windows.ps1
......@@ -50,7 +50,9 @@ if ($env:TASK -eq "swig") {
Exit 0
}
conda install -q -y -n $env:CONDA_ENV joblib matplotlib numpy pandas psutil pytest python-graphviz scikit-learn scipy ; Check-Output $?
conda install -q -y -n $env:CONDA_ENV joblib matplotlib numpy pandas psutil pytest scikit-learn scipy ; Check-Output $?
# python-graphviz has to be installed separately to prevent conda from downgrading to pypy
conda install -q -y -n $env:CONDA_ENV python-graphviz ; Check-Output $?
if ($env:TASK -eq "regular") {
mkdir $env:BUILD_SOURCESDIRECTORY/build; cd $env:BUILD_SOURCESDIRECTORY/build
......
......@@ -281,6 +281,8 @@ jobs:
condition: eq(variables['TASK'], 'bdist')
displayName: 'Install OpenCL'
- script: |
cmd /c "conda config --add channels conda-forge"
cmd /c "conda config --set channel_priority strict"
cmd /c "conda init powershell"
cmd /c "powershell -ExecutionPolicy Bypass -File %BUILD_SOURCESDIRECTORY%/.ci/test_windows.ps1"
displayName: Test
......
FROM ubuntu:16.04
ARG CONDA_DIR=/opt/conda
ARG CONDA_DIR=/opt/miniforge
ENV PATH $CONDA_DIR/bin:$PATH
RUN apt-get update && \
......@@ -13,8 +13,8 @@ RUN apt-get update && \
curl \
git && \
# python environment
curl -sL https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o conda.sh && \
/bin/bash conda.sh -f -b -p $CONDA_DIR && \
curl -sL https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -o miniforge.sh && \
/bin/bash miniforge.sh -f -b -p $CONDA_DIR && \
export PATH="$CONDA_DIR/bin:$PATH" && \
conda config --set always_yes yes --set changeps1 no && \
# lightgbm
......
......@@ -18,7 +18,7 @@ LightGBM can be utilized in GPU and CPU modes and via Python.
## Contents
- LightGBM (cpu + gpu)
- Python 3.8 (conda) + scikit-learn, notebooks, pandas, matplotlib
- Python (conda) + scikit-learn, notebooks, pandas, matplotlib
Running the container starts a Jupyter Notebook at `localhost:8888`.
......
......@@ -63,18 +63,18 @@ RUN mkdir -p /etc/OpenCL/vendors && \
# CONDA
#################################################################################################################
ARG CONDA_DIR=/opt/conda
ARG CONDA_DIR=/opt/miniforge
# add to path
ENV PATH $CONDA_DIR/bin:$PATH
# Install miniconda
# Install miniforge
RUN echo "export PATH=$CONDA_DIR/bin:"'$PATH' > /etc/profile.d/conda.sh && \
curl -sL https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p $CONDA_DIR && \
rm ~/miniconda.sh
curl -sL https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -o ~/miniforge.sh && \
/bin/bash ~/miniforge.sh -b -p $CONDA_DIR && \
rm ~/miniforge.sh
RUN conda config --set always_yes yes --set changeps1 no && \
conda create -y -q -n py3 python=3.8 mkl numpy scipy scikit-learn jupyter notebook ipython pandas matplotlib
conda create -y -q -n py3 numpy scipy scikit-learn jupyter notebook ipython pandas matplotlib
#################################################################################################################
# LightGBM
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment