mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-17 12:30:35 +08:00
Merge pull request #157 from optuna/docker-ghcr
Publish a Docker image to GitHub Container Registry.
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user