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

Test docker unit #4

Open
wants to merge 30 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
aa7aefa
testing workflow
franchuterivera Jun 17, 2020
7e0776b
Documentation for docker images
franchuterivera Jun 17, 2020
6599018
Merge branch 'tmp' into docker_workflow
franchuterivera Jun 17, 2020
3f73316
Test workflow with unittest
franchuterivera Jul 16, 2020
1ffc5cb
Fix workflow
franchuterivera Jul 16, 2020
93ed9ec
Fix workflow
franchuterivera Jul 16, 2020
1792025
Tag with the branch name
franchuterivera Jul 16, 2020
f7fb7b5
Change tag scheme
franchuterivera Jul 16, 2020
b83e297
Change tag scheme
franchuterivera Jul 16, 2020
a2ec4a4
test requirement
franchuterivera Jul 16, 2020
2096aad
test requirement
franchuterivera Jul 16, 2020
63ef59a
install current branch
franchuterivera Jul 16, 2020
c1e8c74
install current branch
franchuterivera Jul 16, 2020
aa7ca60
install current branch
franchuterivera Jul 16, 2020
86978ca
install current branch
franchuterivera Jul 16, 2020
7abf138
change
franchuterivera Jul 16, 2020
3918201
copy
franchuterivera Jul 16, 2020
bb40c5b
dockercopyno
franchuterivera Jul 16, 2020
c23ee57
no_tty
franchuterivera Jul 16, 2020
d2d3100
no_tty
franchuterivera Jul 16, 2020
a686638
python 3
franchuterivera Jul 16, 2020
4caf509
pytest
franchuterivera Jul 16, 2020
1c79905
nocolon
franchuterivera Jul 16, 2020
b13dc07
old
franchuterivera Jul 16, 2020
a4a55cc
fix
franchuterivera Jul 16, 2020
ead33b8
fix
franchuterivera Jul 16, 2020
645391b
fix
franchuterivera Jul 16, 2020
80c8fa7
fix
franchuterivera Jul 16, 2020
bbfd48b
fix
franchuterivera Jul 16, 2020
e494db1
fix
franchuterivera Jul 16, 2020
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
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

## Describe the bug ##
Please describe the bug you're experiencing is precise as possible.

## To Reproduce ##
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

## Expected behavior ##
A clear and concise description of what you expected to happen.

## Actual behavior, stacktrace or logfile ##
Please describe the expected behavior here. If there is a stacktrace, please paste it here. If there is no stacktrace printed, please upload the logfile which was stored in the `tmp_folder`

## Environment and installation: ##

Please give details about your installation:

* OS
* Is your installation in a virtual environment or conda environment?
* Python version
* Auto-sklearn version
46 changes: 46 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#https://help.github.com/en/actions/language-and-framework-guides/publishing-docker-images#publishing-images-to-github-packages
name: Publish Docker image
on:
push:
# Publish on `master` and `development`
branches:
- master
- development
- test_docker_unit

jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
#repository: automl/auto-sklearn/auto-sklearn
repository: franchuterivera/auto-sklearn/auto-sklearn
tags: ${{ steps.extract_branch.outputs.branch }}
- name: Docker Login
run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p $GITHUB_TOKEN
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Pull Docker image
run: docker pull docker.pkg.github.com/$GITHUB_REPOSITORY/auto-sklearn:$BRANCH
env:
BRANCH: ${{ steps.extract_branch.outputs.branch }}
- name: Run image
run: docker run -i -d --name unittester -v $GITHUB_WORKSPACE:/workspace -w /workspace docker.pkg.github.com/$GITHUB_REPOSITORY/auto-sklearn:$BRANCH
env:
BRANCH: ${{ steps.extract_branch.outputs.branch }}
- name: Auto-Sklearn loaded
run: docker exec -i unittester python3 -c 'import autosklearn; print(f"Auto-sklearn imported from {autosklearn.__file__}")'
- name: Run unit testing
run: docker exec -i unittester python3 -m pytest -v test
42 changes: 29 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
FROM ubuntu
FROM ubuntu:18.04

# System requirements
RUN apt-get update && apt-get install -y \
build-essential \
curl \
python3-pip \
swig \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /auto-sklearn

# Copy the checkout autosklearn version for installation
ADD . /auto-sklearn/

# install linux packages
RUN apt-get update

# Set the locale
RUN apt-get -y install locales
RUN touch /usr/share/locale/locale.alias
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

RUN apt install -y python3-dev python3-pip
RUN pip3 install --upgrade setuptools
RUN apt-get install -y build-essential curl

# https://github.com/automl/auto-sklearn/issues/314
RUN apt-get install -y swig3.0
RUN ln -s /usr/bin/swig3.0 /usr/bin/swig

# Upgrade pip then install dependencies
RUN pip3 install --upgrade pip
RUN curl https://raw.githubusercontent.com/automl/auto-sklearn/master/requirements.txt \
| xargs -n 1 -L 1 pip3 install
RUN pip3 install pytest==4.6.* pep8 codecov pytest-cov flake8 flaky openml
RUN curl https://raw.githubusercontent.com/automl/auto-sklearn/master/requirements.txt | xargs -n 1 -L 1 pip3 install
#RUN curl https://raw.githubusercontent.com/automl/auto-sklearn/master/requirements.txt | LC_ALL=C.UTF-8 xargs -n 1 -L 1 pip3 install
RUN pip3 install jupyter

# Install
RUN pip3 install \
auto-sklearn \
jupyter
RUN pip3 install -e /auto-sklearn/
11 changes: 11 additions & 0 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,14 @@ Possible other solutions (not tested):

* virtual machine
* docker image

Docker Image
=========================
A Docker image is also provided as a github package. The user must authenticate following the instructions from `GitHub Packages <https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages>`_ . Then, the image can be downloaded as follows.
.. code:: bash
docker pull docker.pkg.github.com/automl/auto-sklearn/auto-sklearn:latest
docker images # Verify that the image was downloaded

This image can be used to start an interactive session as follows:
.. code:: bash
docker run -it docker.pkg.github.com/automl/auto-sklearn/auto-sklearn:latest