-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from moriyalab/support_new_docker_system
Support New Docker System
- Loading branch information
Showing
11 changed files
with
61 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Docker Build and Push to GHCR | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
tool-cache: false | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to GitHub Container Registry | ||
if: github.event_name == 'push' | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build Docker image | ||
run: | | ||
docker build -t ghcr.io/${{ github.repository }}_dev:latest --target builder_image . | ||
docker build -t ghcr.io/${{ github.repository }}:latest --target release_image . | ||
- name: Push Docker image | ||
if: github.event_name == 'push' | ||
run: | | ||
docker push ghcr.io/${{ github.repository }}_dev:latest | ||
docker push ghcr.io/${{ github.repository }}:latest |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,6 @@ | |
*.png | ||
*.onnx | ||
*.engine | ||
*.mcap | ||
|
||
flagged*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM ultralytics/ultralytics:8.2.63 AS builder_image | ||
|
||
RUN apt-get update && apt-get install -y git curl ffmpeg | ||
RUN git config --global --add safe.directory /app | ||
RUN python3 -m pip install --upgrade pip | ||
RUN python3 -m pip install poetry \ | ||
&& poetry config virtualenvs.create false | ||
|
||
WORKDIR /app | ||
|
||
COPY pyproject.toml poetry.lock ./ | ||
RUN poetry install --no-root | ||
|
||
FROM builder_image AS release_image | ||
|
||
COPY --from=builder_image /app /app | ||
COPY . /app/ | ||
|
||
CMD [ "python3", "app.py" ] |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
#!/bin/bash | ||
|
||
cp /home/root/docker/pyproject.toml /app/pyproject.toml | ||
cd /app | ||
poetry lock --no-update | ||
rm -rf /home/root/docker/poetry.lock | ||
cp /app/poetry.lock /home/root/docker/poetry.lock |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters