Suhwan Choi commited on
Commit
9e831e6
·
1 Parent(s): 93fab71

Add application file

Browse files
Files changed (1) hide show
  1. Dockerfile +38 -0
Dockerfile ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This dockerfile is for https://huggingface.co/spaces/open-world-agents/visualize_dataset
2
+
3
+ # Configure image
4
+ ARG PYTHON_VERSION=3.11
5
+
6
+ FROM python:${PYTHON_VERSION}-slim
7
+ ARG PYTHON_VERSION
8
+ ARG DEBIAN_FRONTEND=noninteractive
9
+
10
+ # Install apt dependencies
11
+ RUN apt-get update && apt-get install -y --no-install-recommends \
12
+ build-essential cmake git wget \
13
+ libglib2.0-0 libgl1-mesa-glx libegl1-mesa ffmpeg \
14
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Setup uv & vuv
17
+ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
18
+ RUN --mount=type=cache,target=/root/.cache/uv \
19
+ uv pip install virtual-uv
20
+
21
+ # Create virtual environment
22
+ RUN uv venv /opt/venv
23
+ ENV VIRTUAL_ENV=/opt/venv
24
+ ENV PATH="/opt/venv/bin:$PATH"
25
+ RUN echo "source /opt/venv/bin/activate" >> /root/.bashrc
26
+
27
+ RUN useradd -m -u 1000 user
28
+
29
+ # Install LeRobot
30
+ RUN git clone https://github.com/open-world-agents/open-world-agents /owa
31
+ WORKDIR /owa/projects/owa-mcap-viewer
32
+ RUN --mount=type=cache,target=/home/user/.cache/uv \
33
+ --mount=type=bind,source=uv.lock,target=uv.lock \
34
+ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
35
+ vuv sync --frozen --no-install-project
36
+
37
+ COPY --chown=user . /owa/projects/owa-mcap-viewer
38
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]