diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0a242a2..d3518d4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 diff --git a/.gitignore b/.gitignore index 3724fcf..cadef0c 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ __pycache__/ *.y4m # Hidden folders +! .github .* # Distribution / packaging diff --git a/Dockerfile b/Dockerfile index f163697..67581c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" ]