Add Dockerfile
Browse files- Dockerfile +31 -0
Dockerfile
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Configure image
|
2 |
+
ARG PYTHON_VERSION=3.10
|
3 |
+
|
4 |
+
FROM python:${PYTHON_VERSION}-slim
|
5 |
+
ARG PYTHON_VERSION
|
6 |
+
ARG DEBIAN_FRONTEND=noninteractive
|
7 |
+
|
8 |
+
# Install apt dependencies
|
9 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
10 |
+
build-essential cmake \
|
11 |
+
libglib2.0-0 libgl1-mesa-glx libegl1-mesa ffmpeg \
|
12 |
+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
13 |
+
|
14 |
+
# Create virtual environment
|
15 |
+
RUN ln -s /usr/bin/python${PYTHON_VERSION} /usr/bin/python
|
16 |
+
RUN python -m venv /opt/venv
|
17 |
+
ENV PATH="/opt/venv/bin:$PATH"
|
18 |
+
RUN echo "source /opt/venv/bin/activate" >> /root/.bashrc
|
19 |
+
|
20 |
+
# Install LeRobot
|
21 |
+
COPY . /lerobot
|
22 |
+
WORKDIR /lerobot
|
23 |
+
RUN pip install --upgrade --no-cache-dir pip
|
24 |
+
RUN pip install --no-cache-dir "." \
|
25 |
+
--extra-index-url https://download.pytorch.org/whl/cpu
|
26 |
+
RUN pip install --no-cache-dir flask
|
27 |
+
|
28 |
+
# Execute in bash shell rather than python
|
29 |
+
CMD ["/bin/bash"]
|
30 |
+
|
31 |
+
RUN lerobot/scripts/visualize_dataset_html.py --repo-id lerobot/koch_pick_place_lego_simple_v2 --port 9200
|