Skip to content
Open
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
30 changes: 30 additions & 0 deletions .github/workflows/publish-images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish Images to Quay.io
on:
workflow_dispatch: {}
push:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README*'
- 'scripts/**'
- 'manifests/**'
- 'design/**'
branches: [ main ]

jobs:
publish-images-to-quay:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Login to Quay.io Registry
run: docker login -u "${{ secrets.QUAY_USERNAME }}" -p "${{ secrets.QUAY_PASSWORD }}" quay.io

- name: Build Image
run: docker build -t quay.io/kruize/hpo:operate-first .

- name: Publish Image to quay
run: docker push quay.io/kruize/hpo:operate-first


27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM registry.fedoraproject.org/f33/python3

LABEL name="Kruize HPO" \
vendor="Red Hat" \
run="docker run --rm -it -p 8085:8085 <image_name:tag>" \
summary="Docker Image for HPO" \
description="For more information on this image please see https://github.com/kruize/hpo/blob/main/README.md"

USER 0

# Copy ML hyperparameter tuning code and other required files
COPY src ./src/
COPY requirements.txt index.html experiment.html ./

# Documented here:
# https://docs.openshift.com/container-platform/4.6/openshift_images/create-images.html#images-create-guide-openshift_create-images
RUN chown -R 1001:0 ./
USER 1001

# Install the dependencies and required python packages
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --requirement requirements.txt

EXPOSE 8085 50051

# Run the application
CMD python3 -u src/service.py