-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Dockerfile without web renderer #344
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -25,7 +25,14 @@ jobs: | |
|
||
- uses: hadolint/[email protected] | ||
with: | ||
dockerfile: Dockerfile | ||
dockerfile: build-tools/docker/slim.Dockerfile | ||
|
||
- name: Build image | ||
run: docker build -t video-compositor . | ||
- uses: hadolint/[email protected] | ||
with: | ||
dockerfile: build-tools/docker/full.Dockerfile | ||
|
||
- name: Build image - slim | ||
run: docker build -f build-tools/docker/slim.Dockerfile -t video-compositor . | ||
|
||
- name: Build image - full | ||
run: docker build -f build-tools/docker/full.Dockerfile -t video-compositor . |
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,52 @@ | ||
# Builder image | ||
FROM ubuntu:mantic-20231011 as builder | ||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
ARG USERNAME=compositor | ||
ARG RUST_VERSION=1.74 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update -y -qq && \ | ||
apt-get install -y \ | ||
build-essential curl pkg-config libssl-dev libclang-dev git sudo \ | ||
libegl1-mesa-dev libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers \ | ||
ffmpeg libavcodec-dev libavformat-dev libavfilter-dev libavdevice-dev && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y | ||
RUN source ~/.cargo/env && rustup install $RUST_VERSION && rustup default $RUST_VERSION | ||
|
||
COPY . /root/project | ||
WORKDIR /root/project | ||
|
||
RUN source ~/.cargo/env && cargo build --release --no-default-features | ||
|
||
# Runtime image | ||
FROM ubuntu:mantic-20231011 | ||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
ARG USERNAME=compositor | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV NVIDIA_DRIVER_CAPABILITIES=compute,graphics,utility | ||
|
||
RUN apt-get update -y -qq && \ | ||
apt-get install -y \ | ||
sudo adduser ffmpeg && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN useradd -ms /bin/bash $USERNAME && adduser $USERNAME sudo | ||
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | ||
USER $USERNAME | ||
RUN mkdir -p /home/$USERNAME/video_compositor | ||
WORKDIR /home/$USERNAME/video_compositor | ||
|
||
COPY --from=builder --chown=$USERNAME:$USERNAME /root/project/target/release/main_process /home/$USERNAME/video_compositor/main_process | ||
|
||
ENV LIVE_COMPOSITOR_WEB_RENDERER_ENABLE=0 | ||
ENV LIVE_COMPOSITOR_WEB_RENDERER_GPU_ENABLE=0 | ||
|
||
ENTRYPOINT ["/home/compositor/video_compositor/main_process"] |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idk if
slim
is self-explanatory. Maybe so use some name indicating that it removes the web rendererThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are assuming here that slim image means that it's compositor without web renderer :D
It depends what this file is suppose to mean.
I decided to go with slim because from those 2 approaches it seem to me slightly better, but I don't feel strongly about it.