Skip to content

[CI] Fix broken Docker container 'cpu' #5956

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

Merged
merged 1 commit into from
Jul 29, 2020
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
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def Lint() {
def container_type = "cpu"
def docker_binary = "docker"
sh """
${dockerRun} ${container_type} ${docker_binary} make lint
${dockerRun} ${container_type} ${docker_binary} bash -c "source activate cpu_test && make lint"
"""
deleteDir()
}
Expand All @@ -173,7 +173,7 @@ def SphinxDoc() {
def docker_binary = "docker"
def docker_extra_params = "CI_DOCKER_EXTRA_PARAMS_INIT='-e SPHINX_GIT_BRANCH=${BRANCH_NAME}'"
sh """#!/bin/bash
${docker_extra_params} ${dockerRun} ${container_type} ${docker_binary} make -C doc html
${docker_extra_params} ${dockerRun} ${container_type} ${docker_binary} bash -c "source activate cpu_test && make -C doc html"
"""
deleteDir()
}
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile-win64
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def TestWin64() {
bat "build\\testxgboost.exe"
echo "Installing Python dependencies..."
def env_name = 'win64_' + UUID.randomUUID().toString().replaceAll('-', '')
bat "conda env create -n ${env_name} --file=tests/ci_build/win64_conda_env.yml"
bat "conda env create -n ${env_name} --file=tests/ci_build/conda_env/win64_test.yml"
echo "Installing Python wheel..."
bat """
conda activate ${env_name} && for /R %%i in (python-package\\dist\\*.whl) DO python -m pip install "%%i"
Expand Down
10 changes: 3 additions & 7 deletions tests/ci_build/Dockerfile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,9 @@ ENV PATH=/opt/python/bin:$PATH

ENV GOSU_VERSION 1.10

# Install Python packages in default env
RUN \
pip install pyyaml cpplint pylint astroid sphinx numpy scipy pandas matplotlib sh \
recommonmark guzzle_sphinx_theme mock breathe graphviz hypothesis\
pytest scikit-learn wheel kubernetes urllib3 jsonschema boto3 && \
pip install https://h2o-release.s3.amazonaws.com/datatable/stable/datatable-0.7.0/datatable-0.7.0-cp37-cp37m-linux_x86_64.whl && \
pip install "dask[complete]"
# Create new Conda environment
COPY conda_env/cpu_test.yml /scripts/
RUN conda env create -n cpu_test --file=/scripts/cpu_test.yml

# Install lightweight sudo (not bound to TTY)
RUN set -ex; \
Expand Down
33 changes: 33 additions & 0 deletions tests/ci_build/conda_env/cpu_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: cpu_test
channels:
- conda-forge
dependencies:
- python=3.7
- pip
- wheel
- pyyaml
- cpplint
- pylint
- numpy
- scipy
- scikit-learn
- pandas
- matplotlib
- dask
- python-graphviz
- hypothesis
- astroid
- sphinx
- sh
- recommonmark
- mock
- breathe
- pytest
- python-kubernetes
- urllib3
- jsonschema
- boto3
- awscli
- pip:
- guzzle_sphinx_theme
- datatable
2 changes: 2 additions & 0 deletions tests/ci_build/runxgb.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

source activate cpu_test

export DMLC_SUBMIT_CLUSTER=local

submit="python3 dmlc-core/tracker/dmlc-submit"
Expand Down
1 change: 1 addition & 0 deletions tests/ci_build/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ case "$suite" in
;;

cpu)
source activate cpu_test
install_xgboost
pytest -v -s --fulltrace tests/python
cd tests/distributed
Expand Down