File size: 1,660 Bytes
9e831e6 da80f2b 9e831e6 c5d2096 d251a3e 030bda4 8dbde7a 9e831e6 a7b94b5 8dbde7a 9e831e6 fc9dd89 1a3553f fc9dd89 1a3553f da6487c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# This dockerfile is for https://huggingface.co/spaces/open-world-agents/visualize_dataset
# Configure image
ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION}-slim
ARG PYTHON_VERSION
ARG DEBIAN_FRONTEND=noninteractive
# Install apt dependencies
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/*
# Setup uv & vuv
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
# Create virtual environment
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
# Install OWA
ARG CACHE_BUST=4
RUN git clone --depth 1 https://github.com/open-world-agents/open-world-agents /owa
WORKDIR /owa
RUN --mount=type=cache,target=/home/user/.cache/uv \
vuv install --frozen
WORKDIR /owa/projects/owa-mcap-viewer
RUN --mount=type=cache,target=/home/user/.cache/uv \
# --mount=type=bind,source=uv.lock,target=uv.lock \
# --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
vuv install --frozen
# Prepare example datasets
# RUN --mount=type=cache,target=/home/user/.cache/uv \
# vuv pip install huggingface-hub
# RUN huggingface-cli download open-world-agents/example_dataset --repo-type dataset --local-dir /data
# ENV EXPORT_PATH=/data
# RUN chown -R user:user /data
RUN chown -R user:user /owa /opt/venv
CMD ["uvicorn", "owa_viewer:app", "--host", "0.0.0.0", "--port", "7860"] |