This commit is contained in:
Luis Garcia 2021-05-15 00:09:01 -06:00 committed by GitHub
parent d5ed6e666e
commit ad72975a25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 53 additions and 14 deletions

View file

@ -12,7 +12,7 @@ on:
- "*.md"
env:
deps: tree
deps: tree python-is-python3 python3-venv
DEBIAN_FRONTEND: noninteractive
jobs:
@ -74,10 +74,42 @@ jobs:
SvtAv1EncApp --help
rav1e --help
x265 --help || true
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
profile: default
default: true
components: rustfmt, clippy
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
- name: Install requirements
run: |
apt-get update && apt-get install -y ${{ env.deps }}
python3 setup.py install
- 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
- name: Download videos
run: |
for url in raw.githubusercontent.com/OpenVisualCloud/SVT-AV1-Resources/master randomderp.com; do

View file

@ -11,24 +11,27 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install VTM
RUN git clone https://vcgit.hhi.fraunhofer.de/jvet/VVCSoftware_VTM.git /home/app_user/VTM && \
mkdir -p /home/app_user/VTM/build
WORKDIR /home/app_user/VTM/build
RUN git clone https://vcgit.hhi.fraunhofer.de/jvet/VVCSoftware_VTM.git /VTM && \
mkdir -p /VTM/build
WORKDIR /VTM/build
RUN cmake .. -DCMAKE_BUILD_TYPE=Release && \
make -j"$(nproc)" && \
ln -s ../bin/EncoderAppStatic /usr/local/bin/vvc_encoder
# Create user
RUN useradd -ms /bin/bash app_user
# Install av1an
COPY . /home/app_user/Av1an
WORKDIR /home/app_user/Av1an
COPY . /Av1an
WORKDIR /Av1an
RUN python3 setup.py install
# Change permissions
RUN chmod 777 -R /home/app_user
RUN chmod 777 -R /Av1an
USER app_user
VOLUME ["/videos"]
WORKDIR /videos
ENTRYPOINT [ "/home/app_user/Av1an/av1an.py" ]
ENTRYPOINT [ "/Av1an/av1an.py" ]

View file

@ -234,12 +234,15 @@ With your own parameters:
## Docker
Av1an can be run in a Docker container with the following command if you are in the current directory
Av1an can be run in a Docker container with the following command if you are in the current directory
Linux
```bash
docker run -v "$(pwd)":/videos --user $(id -u):$(id -g) -it --rm masterofzen/av1an:latest -i S01E01.mkv {options}
```
Windows
```powershell
docker run -v ${PWD}:/videos -it --rm masterofzen/av1an:latest -i S01E01.mkv {options}
```
Docker can also be built by using
```bash
@ -252,6 +255,8 @@ To specify a different directory to use you would replace $(pwd) with the direct
docker run -v /c/Users/masterofzen/Videos:/videos --user $(id -u):$(id -g) -it --rm masterofzen/av1an:latest -i S01E01.mkv {options}
```
The --user flag is required on linux to avoid permission issues with the docker container not being able to write to the location, if you get permission issues ensure your user has access to the folder that you are using to encode.
### Docker tags
The docker image has the following tags
@ -263,8 +268,6 @@ The docker image has the following tags
| sha-##### | Contains the commit of the hash that is referenced |
| #.## | Stable av1an version release |
The --user flag is required to avoid permission issues with the docker container not being able to write to the location, if you get permission issues ensure your user has access to the folder that you are using to encode.
### Support the developer
Bitcoin - 1GTRkvV4KdSaRyFDYTpZckPKQCoWbWkJV1

View file

@ -6,3 +6,4 @@ psutil
scipy
matplotlib
setuptools_rust
maturin