File size: 1,505 Bytes
9e831e6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
da80f2b
9e831e6
 
 
 
 
 
 
 
 
 
 
 
 
a7b94b5
 
9e831e6
 
fc9dd89
 
 
 
 
 
9e831e6
 
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
# 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 LeRobot
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 \
    # --mount=type=bind,source=uv.lock,target=uv.lock \
    # --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
    vuv sync --frozen --no-install-project

# 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 --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"]