-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
136 additions
and
6 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,47 @@ | ||
name: docker build CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
docker: | ||
strategy: | ||
matrix: | ||
dockerfile: ["server", "worker-cut", "worker-encode", "worker-merge"] | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push - Encode | ||
if: matrix.dockerfile == 'worker-encode' | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ./deploy/Dockerfile-${{ matrix.dockerfile }} | ||
platforms: linux/amd64 | ||
push: true | ||
tags: lychee0/finalrip-${{ matrix.dockerfile }}:dev | ||
|
||
- name: Build and push | ||
if: matrix.dockerfile != 'worker-encode' | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ./deploy/Dockerfile-${{ matrix.dockerfile }} | ||
platforms: linux/amd64, linux/arm64 | ||
push: true | ||
tags: lychee0/finalrip-${{ matrix.dockerfile }}:dev |
5 changes: 1 addition & 4 deletions
5
.github/workflows/docker.yml → .github/workflows/docker-release.yml
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,9 +1,6 @@ | ||
name: docker build | ||
name: docker build Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
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
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
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,54 @@ | ||
FROM golang:1.22-bookworm AS builder | ||
|
||
ENV GO111MODULE=on \ | ||
CGO_ENABLED=0 | ||
|
||
WORKDIR /build | ||
|
||
COPY . . | ||
|
||
RUN go mod download | ||
|
||
RUN make worker | ||
|
||
FROM continuumio/miniconda3:24.5.0-0 AS app | ||
|
||
# prepare environment | ||
RUN conda install python=3.10.* -y | ||
RUN apt update && apt install -y libgl1-mesa-glx | ||
|
||
# install vapoursynth | ||
RUN conda install conda-forge::vapoursynth=69 -y | ||
|
||
# install vapoursynth C++ plugins | ||
RUN conda install -n base libarchive -c main --force-reinstall -y | ||
RUN conda install tongyuantongyu::vapoursynth-bestsource=5 -y | ||
RUN conda install tongyuantongyu::vapoursynth-fmtconv=30 -y | ||
|
||
# install vapoursynth python plugins | ||
RUN conda install tongyuantongyu::vapoursynth-mvsfunc=10.10 -y | ||
RUN conda install tongyuantongyu::vapoursynth-vsutil=0.8.0 -y | ||
RUN pip install git+https://github.com/HomeOfVapourSynthEvolution/havsfunc.git | ||
|
||
# install python packages | ||
RUN pip install numpy==1.26.4 | ||
RUN pip install opencv-python==4.10.0.82 | ||
|
||
# install CUDA | ||
RUN conda install conda-forge::cudatoolkit=11.8.0 -y | ||
RUN conda install conda-forge::cudnn=8.9.7.* -y | ||
|
||
# install PyTorch | ||
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 | ||
|
||
# install AI packages | ||
RUN pip install vsrealesrgan | ||
RUN python -m vsrealesrgan | ||
|
||
# worker app | ||
WORKDIR /app | ||
|
||
COPY --from=builder /build/worker/worker /app/ | ||
COPY --from=builder /build/conf/finalrip.yml /app/conf/ | ||
|
||
CMD ["/app/worker", "encode"] |
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
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