Something went wrong. Try again.
a fork of EvalEx by ezylang with a handful of breaking changes
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142FROM python:3.12-alpineCOPY --from=ghcr.io/astral-sh/uv:0.7.12 /uv /uvx /bin/# Install build tools & runtime dependenciesRUN apk add --no-cache \ ffmpeg \ file \ libmagicRUN mkdir -p /app/dataWORKDIR /app# switch to a non-root userRUN adduser -D -u 1000 app && \ chown -R app:app /appUSER app# Enable bytecode compilationENV UV_COMPILE_BYTECODE=1# Copy from the cache instead of linking since it's a mounted volumeENV UV_LINK_MODE=copy# Install the project's dependencies using the lockfile and settingsCOPY ./uv.lock ./pyproject.toml /app/RUN --mount=type=cache,target=/root/.cache/uv \ uv sync --locked --no-install-project --no-dev# Define app data volumeVOLUME /app/data# Then, add the rest of the project source code and install itCOPY . /appRUN --mount=type=cache,target=/root/.cache/uv \ uv sync --locked --no-dev# Place executables in the environment at the front of the pathENV PATH="/app/.venv/bin:$PATH"# Set entrypoint to run the app using uvENTRYPOINT ["uv", "run", "main.py"]