FROM alpine:3 AS build RUN apk add --no-cache gcc musl-dev COPY src/tile.c src/dims.h /b/ RUN gcc -O2 -D_FILE_OFFSET_BITS=64 -static -I/b -o /index.cgi /b/tile.c FROM alpine:3 RUN apk add --no-cache busybox-extras python3 py3-pip && \ pip install --no-cache-dir --break-system-packages huggingface_hub COPY index.html /www/index.html COPY app.js /www/app.js COPY dist/meta.js /www/meta.js COPY dist/offsets.bin /www/offsets.bin COPY --from=build /index.cgi /www/cgi-bin/index.cgi COPY entrypoint.sh /entrypoint.sh RUN chmod +x /www/cgi-bin/index.cgi /entrypoint.sh EXPOSE 7860 CMD ["/entrypoint.sh"]