|
|
|
|
|
|
|
ARG PYTHON_VERSION=3.11 |
|
|
|
FROM python:${PYTHON_VERSION}-slim |
|
ARG PYTHON_VERSION |
|
ARG DEBIAN_FRONTEND=noninteractive |
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \ |
|
build-essential cmake git wget \ |
|
libglib2.0-0 libgl1-mesa-glx libegl1-mesa ffmpeg \ |
|
&& apt-get clean && rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ |
|
RUN --mount=type=cache,target=/root/.cache/uv \ |
|
uv pip install virtual-uv --system |
|
|
|
|
|
RUN uv venv /opt/venv |
|
ENV VIRTUAL_ENV=/opt/venv |
|
ENV PATH="/opt/venv/bin:$PATH" |
|
RUN echo "source /opt/venv/bin/activate" >> /root/.bashrc |
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
|
|
RUN git clone https://github.com/open-world-agents/open-world-agents /owa |
|
WORKDIR /owa/projects/owa-mcap-viewer |
|
RUN --mount=type=cache,target=/home/user/.cache/uv \ |
|
|
|
|
|
vuv sync --frozen --no-install-project |
|
|
|
|
|
RUN --mount=type=cache,target=/home/user/.cache/uv \ |
|
vuv pip install huggingface-hub |
|
RUN huggingface-cli download open-world-agents/example-dataset --local-dir /data |
|
ENV DATA_DIR=/data |
|
|
|
COPY --chown=user . /owa/projects/owa-mcap-viewer |
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |