Replace stateful cache with atomic C controller

This commit is contained in:
SpiderFish
2026-08-29 21:56:05 +10:00
parent a66945c245
commit bd2b623633
12 changed files with 1823 additions and 1199 deletions
+16 -7
View File
@@ -1,12 +1,21 @@
FROM ubuntu:24.04
FROM ubuntu:24.04 AS build
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates ffmpeg procps python3 util-linux \
&& apt-get install -y --no-install-recommends \
build-essential pkg-config libcurl4-openssl-dev libjson-c-dev libxxhash-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY Makefile pretranscode.c ./
COPY tests ./tests
RUN make check CFLAGS='-O2 -std=c17 -Wall -Wextra -Wpedantic -Werror -Wconversion -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wformat=2 -fstack-protector-strong'
COPY pretranscode.py /app/pretranscode
RUN chmod 0755 /app/pretranscode
ENTRYPOINT ["nice","-n","19","ionice","-c","3","python3","/app/pretranscode"]
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates ffmpeg libcurl4t64 libjson-c5 libxxhash0 procps \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /src/pretranscode /usr/local/bin/pretranscode
USER 1000:1000
ENTRYPOINT ["/usr/local/bin/pretranscode"]
CMD ["run"]