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

V0.1 feature docker ci #77

Merged
merged 7 commits into from
Sep 23, 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
10 changes: 5 additions & 5 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel twine
Expand All @@ -42,26 +42,26 @@ jobs:
run: |
cython ./maro/backends/backend.pyx ./maro/backends/np_backend.pyx ./maro/backends/raw_backend.pyx ./maro/backends/frame.pyx -3 -E FRAME_BACKEND=NUMPY,NODES_MEMORY_LAYOUT=ONE_BLOCK -X embedsignature=True

- name: build wheel on Windows and macOS
- name: Build wheel on Windows and macOS
if: runner.os == 'Windows' || runner.os == 'macOS'
run: |
python setup.py bdist_wheel

- name: build manylinux wheel
- name: Build manylinux wheel
if: runner.os == 'Linux' && matrix.python-version == '3.6'
uses: RalfG/python-wheels-manylinux-build@v0.3.1-manylinux2010_x86_64
with:
python-versions: 'cp36-cp36m cp37-cp37m'
build-requirements: 'numpy'
pip-wheel-args: '-w ./wheelhouse' # save wheel packages to wheelhouse folder

- name: move valid packages to dist folder for manylinux
- name: Move valid packages to dist folder for manylinux
if: runner.os == 'Linux' && matrix.python-version == '3.6'
run: |
mkdir -p dist
cp wheelhouse/maro-*-manylinux*.whl dist

- name: build source package on linux
- name: Build source package on linux
if: runner.os == 'Linux' && matrix.python-version == '3.6'
run: |
python setup.py sdist
Expand Down
45 changes: 19 additions & 26 deletions .github/workflows/deploy_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,23 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6

- name: Build and push Docker images
# You may pin to the exact commit or the version.
# uses: docker/build-push-action@ab83648e2e224cfeeab899e23b639660765c3a89
uses: docker/build-push-action@v1.1.1
with:
# Username used to log in to a Docker registry. If not set then no login will occur
username: ${{ secrets.DOCKER_HUB_USERNAME }}
# Password or personal access token used to log in to a Docker registry. If not set then no login will occur
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
# Server address of Docker registry. If not set then will default to Docker Hub
registry: https://hub.docker.com/repository/docker/arthursjiang/maro
# Docker repository to tag the image with
repository: latest
# Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags
tags: citi-bike, inventory-management, operations-research, reinforcement-learning, resource-optimization, simulator
# Automatically tags the built image with the git reference as per the readme
# Path to the build context
path: .
# Path to the Dockerfile (Default is '{path}/Dockerfile')
dockerfile: docker_files/cpu.play.df
# Sets the target stage to build
target: maro/playground:cpu
# Whether to push the image
push: true
- name: Build image
run: |
pip install -r ./maro/requirements.build.txt
cython ./maro/backends/backend.pyx ./maro/backends/np_backend.pyx ./maro/backends/raw_backend.pyx ./maro/backends/frame.pyx -3 -E FRAME_BACKEND=NUMPY,NODES_MEMORY_LAYOUT=ONE_BLOCK -X embedsignature=True
docker build -f ./docker_files/cpu.play.df . -t ${{ secrets.DOCKER_HUB_USERNAME }}/maro:cpu

- name: Login docker hub
run: |
docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Push image
run: |
docker push ${{ secrets.DOCKER_HUB_USERNAME }}/maro
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Contributing to MARO

MARO is newborn for Reinforcement learning as a Service (RaaS) in the resource optimization domain. Your contribution is precious to make RaaS come true.

- [Open issues](https://github.com/microsoft/maro/issues) for reporting bugs and requesting new features.
- Contribute to [examples](https://github.com/microsoft/maro/tree/master/examples) to share your problem modeling to others.
- Contribute to [scenarios](https://github.com/microsoft/maro/tree/master/maro/simulator/scenarios) to provide more meaningful environments.
- Contribute to [topologies](https://github.com/microsoft/maro/tree/master/maro/simulator/scenarios/citi_bike/topologies) to enhance existing MARO scenarios.
- Contribute to [algorithms](https://github.com/microsoft/maro/tree/master/maro/rl/algorithms) to enrich MARO RL libraries.
- Contribute to [orchestration](https://github.com/microsoft/maro/tree/master/maro/cli) to broad MARO supported cloud services.
- Contribute to [communication](https://github.com/microsoft/maro/tree/master/maro/communication) to enhance MARO distributed training capacity.
- Contribute to [tests](https://github.com/microsoft/maro/tree/master/tests) to make it more reliable and stable.
- Contribute to [documentation](https://github.com/microsoft/maro/tree/master/maro) to make it straightforward for everyone.