diff --git a/Dockerfile b/Dockerfile index 97546153b..39cff05b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 AS build +FROM ubuntu:21.04 AS build ARG DEBIAN_FRONTEND=noninteractive @@ -22,23 +22,19 @@ WORKDIR /src/dim RUN sqlite3 -init /src/dim/database/migrations/*.sql /src/dim/dim_dev.db RUN DATABASE_URL="sqlite:///src/dim/dim_dev.db" cargo build --release -FROM ubuntu:20.04 AS release +FROM ubuntu:21.04 AS release ENV RUST_BACKTRACE=full ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt ENV SSL_CERT_DIR=/etc/ssl/certs +ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ - apt-get install -y ffmpeg ca-certificates sudo libsqlite3-dev + apt-get install -y ca-certificates sudo libsqlite3-dev libva2 libva-drm2 libharfbuzz0b libfontconfig libfribidi0 libtheora0 libvorbis0a libvorbisenc2 COPY --from=build /src/dim/target/release/dim /opt/dim/dim -COPY --from=build /src/dim/start.sh /opt/dim/start.sh - -RUN mkdir /opt/dim/utils -RUN ln -s /usr/bin/ffmpeg /opt/dim/utils/ffmpeg -RUN ln -s /usr/bin/ffprobe /opt/dim/utils/ffprobe - -RUN chmod +x /opt/dim/start.sh +COPY --from=build /src/dim/utils/ffmpeg /opt/dim/utils/ffmpeg +COPY --from=build /src/dim/utils/ffprobe /opt/dim/utils/ffprobe EXPOSE 8000 VOLUME ["/opt/dim/transcoding", "/opt/dim/config"] -CMD ["/opt/dim/start.sh"] +CMD ["/opt/dim/dim"] diff --git a/README.md b/README.md index a16035e83..4d59bf72f 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ Dim is a self hosted media manager. With minimal setup, Dim will organize and be ## Running with docker 1. `docker run -d -p 8000:8000/tcp --mount type=bind,source=/media,target=/media vgarleanu/dim:latest` + You can also run dim with hardware accelerated transcoding enabled with: + 2. `docker run -d -p 8000:8000/tcp --mount type=bind,source=/media,target=/media --device=/dev/dri/renderD128 vgarleanu/dim:latest` ## Running from source ### Dependencies @@ -20,6 +22,9 @@ Dim is a self hosted media manager. With minimal setup, Dim will organize and be * rustc (nightly) * yarn, npm * libssl-dev + * libva + * libva-dev + * libva-drm * ffmpeg You can then clone the repository and build dim with the following commands: diff --git a/dim/Cargo.toml b/dim/Cargo.toml index 8973224f3..c4163f984 100644 --- a/dim/Cargo.toml +++ b/dim/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dim" -version = "0.3.0-rc5" +version = "0.3.0-rc6" build = "src/build.rs" authors = ["Valerian G. "] edition = "2018" @@ -23,7 +23,7 @@ serde_json = "^1.0.64" database = { path = "../database", default-features = false, optional = true } events = { path = "../events" } auth = { path = "../auth" } -nightfall = { git = "https://github.com/Dusk-Labs/nightfall", tag = "0.3.7" } +nightfall = { git = "https://github.com/Dusk-Labs/nightfall", tag = "0.3.10" } lazy_static = "1.4.0" walkdir = "2.3.1"