hey <@U07DK5DSFEG> did you ever find out a solutio...
# ask-marvin
z
hey @Javier SG did you ever find out a solution here? i have the same question and can't find docs
j
Hey @Zach Khorozian! Yeah, check this out, hope it helps! Let me know if you find a better way of doing it :)
Copy code
FROM <http://ghcr.io/osgeo/gdal:ubuntu-small-3.11.0|ghcr.io/osgeo/gdal:ubuntu-small-3.11.0> AS base
COPY --from=<http://ghcr.io/astral-sh/uv:0.7.13|ghcr.io/astral-sh/uv:0.7.13> /uv /uvx /bin/

# Python version
RUN apt-get update --fix-missing && \
    apt-get install -y software-properties-common && \
    add-apt-repository 'ppa:deadsnakes/ppa' && \
    apt-get update --fix-missing && \
    apt-get install -y python3.11 python3.11-dev python3.11-distutils
RUN ln -sf python3.11 /usr/bin/python3 && ln -sf python3.11 /usr/bin/python

# Extra deps
RUN apt-get install -y g++ gcc curl git make libsqlite3-dev zlib1g-dev

# Tippecanoe
RUN git clone <https://github.com/mapbox/tippecanoe.git> \
    && cd tippecanoe \
    && make -j \
    && make install

# Prefect expects an entrypoint.sh file, from <https://github.com/PrefectHQ/prefect/blob/main/Dockerfile>
# <https://github.com/PrefectHQ/prefect/blob/main/scripts/entrypoint.sh>
COPY entrypoint.sh /opt/prefect/entrypoint.sh
RUN chmod +x /opt/prefect/entrypoint.sh

# Install uv
ENV UV_SYSTEM_PYTHON=1
RUN curl -LsSf <https://astral.sh/uv/0.7.13/install.sh> | sh

# Install dependencies
WORKDIR /app
COPY ./pyproject.toml ./uv.lock /app/
RUN uv pip install --system .

# Clean up
RUN rm -rf /var/lib/apt/lists/*
API & PREFECT
Copy code
FROM <my-company-registry>/backend-base:latest AS base

FROM base AS prefect
ENTRYPOINT ["/opt/prefect/entrypoint.sh"]

FROM base AS api
EXPOSE 8000
COPY . /app
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8000"]