Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (34 loc) · 1.52 KB
/
Copy pathDockerfile
File metadata and controls
45 lines (34 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM nvidia/cuda:12.9.2-cudnn-runtime-ubuntu24.04
ARG PEERTUBE_RUNNER_VERSION=0.7.0
ENV DEBIAN_FRONTEND=noninteractive
ENV VIRTUAL_ENV="/opt/peertube-runner-venv"
ENV PATH="${VIRTUAL_ENV}/bin:/usr/local/bin:${PATH}"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 python3-venv ffmpeg curl ca-certificates gosu bsdutils && \
mv /usr/bin/ffmpeg /usr/local/bin/ffmpeg-real && \
rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://deb.nodesource.com/setup_24.x | bash - && \
apt-get update && \
apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/*
RUN python3 -m venv "${VIRTUAL_ENV}" && \
pip install --no-cache-dir \
ctranslate2==4.8.2 \
whisper-ctranslate2==0.5.7
COPY patch-peertube-runner-logs.mjs /tmp/patch-peertube-runner-logs.mjs
RUN npm install -g "@peertube/peertube-runner@${PEERTUBE_RUNNER_VERSION}" && \
node /tmp/patch-peertube-runner-logs.mjs "$(npm root -g)/@peertube/peertube-runner/dist/peertube-runner.mjs" && \
rm /tmp/patch-peertube-runner-logs.mjs
COPY start.sh /home/runner/start.sh
RUN chmod +x /home/runner/start.sh
COPY ffmpeg-nvenc-wrapper.sh /usr/local/bin/ffmpeg
RUN chmod +x /usr/local/bin/ffmpeg
RUN useradd -ms /bin/bash runner && \
mkdir -p \
/home/runner/.config/peertube-runner-nodejs/default \
/home/runner/.cache \
/home/runner/.local/share/peertube-runner-nodejs/default && \
chown -R runner:runner /home/runner
WORKDIR /home/runner
ENTRYPOINT ["./start.sh"]