Fix workflow, Fix Dockerfile (#303)

* Fix workflow
* Dockerfile: Build rust
* Action: Fix svt-av1
This commit is contained in:
Luigi311 2021-07-18 17:36:06 -06:00 committed by GitHub
parent 3ad082d2e8
commit 16e39713a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 33 deletions

View file

@ -12,7 +12,7 @@ on:
- "*.md"
env:
deps: tree python-is-python3 python3-venv
deps: tree
DEBIAN_FRONTEND: noninteractive
jobs:
@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
enc: [aom, rav1e, svt_av1, vpx, x265, x264]
enc: [aom, rav1e, svt-av1, vpx, x265, x264]
name: [baseline, baseline-select, target-quality, probe-slow]
include:
- name: baseline
@ -91,23 +91,9 @@ jobs:
run: |
apt-get update && apt-get install -y ${{ env.deps }}
- uses: syphar/restore-virtualenv@v1
id: cache-virtualenv
with:
requirement_files: requirements.txt # this is optional
- uses: syphar/restore-pip-download-cache@v1
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
# the package installation will only be executed when the
# requirements-files have changed.
- run: pip3 install -r requirements.txt
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
- name: Build Av1an
run: |
pip3 install vapoursynth
maturin develop --release -m av1an-pyo3/Cargo.toml
cargo build --release
- name: Download videos
run: |
@ -118,7 +104,7 @@ jobs:
- name: Testing ${{ matrix.name }}
run: |
./av1an.py -i bus_cif.y4m -e ${{ matrix.enc }} -l log_av1an --keep -o "bus_cif.mkv" ${{ matrix.flags }}
target/release/av1an -i bus_cif.y4m -e ${{ matrix.enc }} -l log_av1an --keep -o "bus_cif.mkv" ${{ matrix.flags }}
du -h bus_cif.mkv
tree -a

1
.gitignore vendored
View file

@ -15,6 +15,7 @@ __pycache__/
*.y4m
# Hidden folders
! .github
.*
# Distribution / packaging

View file

@ -2,7 +2,7 @@ FROM luigi311/encoders-docker:latest
ENV MPLCONFIGDIR="/home/app_user/"
ARG DEBIAN_FRONTEND=noninteractive
ARG DEPENDENCIES="mkvtoolnix curl python-is-python3 python3-venv"
ARG DEPENDENCIES="mkvtoolnix curl"
# Install dependencies
RUN apt-get update && \
@ -25,22 +25,12 @@ USER app_user
# Install rust
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain nightly
# Copy av1an requirements
COPY --chown=app_user requirements.txt /Av1an/requirements.txt
WORKDIR /Av1an
# Create virtualenv required for maturin develop
ENV VIRTUAL_ENV=/Av1an/.venv
RUN python3 -m venv "${VIRTUAL_ENV}"
ENV PATH="$VIRTUAL_ENV/bin:/home/app_user/.cargo/bin:$PATH"
# Install av1an requirements
RUN pip3 install wheel && pip3 install -r requirements.txt vapoursynth
ENV PATH="/home/app_user/.cargo/bin:$PATH"
# Copy av1an and build av1an
COPY --chown=app_user . /Av1an
RUN maturin develop --release -m av1an-pyo3/Cargo.toml
WORKDIR /Av1an
RUN cargo build --release
# Open up /Av1an to all users
RUN chmod 777 /Av1an
@ -48,4 +38,4 @@ RUN chmod 777 /Av1an
VOLUME ["/videos"]
WORKDIR /videos
ENTRYPOINT [ "/Av1an/av1an.py" ]
ENTRYPOINT [ "/Av1an/target/release/av1an" ]