Skip to content

Commit

Permalink
Merge pull request #157 from optuna/docker-ghcr
Browse files Browse the repository at this point in the history
Publish a Docker image to GitHub Container Registry.
  • Loading branch information
c-bata authored Dec 28, 2021
2 parents d0869ba + 49a818a commit b33c30e
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/docker-ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish a Docker image to ghcr.io
on:
push:
tags:
- v*.*.*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: echo "REPO=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
- name: Enable buildx
uses: docker/setup-buildx-action@v1
- name: Login
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker build/push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/${{ env.REPO }}:latest
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,30 @@ optional arguments:

</details>


## Usage (Docker)

You can also use a Docker image to run optuna-dashboard.
The image only supports SQLite3, MySQL(PyMySQL), and PostgreSQL(Psycopg2).

```
# SQLite3
$ docker run -it --rm -p 8080:8080 -v `PWD`:/app ghcr.io/optuna/optuna-dashboard sqlite:///db.sqlite3
```

```
# MySQL (PyMySQL)
$ docker run -it --rm -p 8080:8080 ghcr.io/optuna/optuna-dashboard mysql+pymysql://username:password@hostname:3306/dbname
```

```
# PostgreSQL (Psycopg2)
$ docker run -it --rm -p 8080:8080 ghcr.io/optuna/optuna-dashboard postgresql+psycopg2://username:password@hostname:5432/dbname
```

https://github.com/optuna/optuna-dashboard/pkgs/container/optuna-dashboard


## Features

### Manage studies
Expand Down

0 comments on commit b33c30e

Please sign in to comment.