Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +25 -29
Dockerfile
CHANGED
|
@@ -1,31 +1,27 @@
|
|
| 1 |
-
|
| 2 |
-
ARG PYTHON_VERSION=3.10
|
| 3 |
|
| 4 |
-
|
| 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 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
# Install
|
| 23 |
-
RUN
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
|
|
|
|
|
| 1 |
+
FROM node:18-slim
|
|
|
|
| 2 |
|
| 3 |
+
# Install git and clean up in one step to keep the image size down
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
+
git \
|
| 6 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 7 |
+
|
| 8 |
+
# Set working directory
|
| 9 |
+
WORKDIR /app
|
| 10 |
+
|
| 11 |
+
# Clone the repository with depth 1 (shallow clone)
|
| 12 |
+
RUN git clone --depth 1 -b update_html_visualizer https://github.com/mishig25/lerobot.git .
|
| 13 |
+
|
| 14 |
+
# Change to the HTML visualizer directory
|
| 15 |
+
WORKDIR /app/lerobot/html_dataset_visualizer
|
| 16 |
+
|
| 17 |
+
# Install production dependencies only
|
| 18 |
+
RUN npm ci --production
|
| 19 |
+
|
| 20 |
+
# Expose port 7860
|
| 21 |
+
EXPOSE 7860
|
| 22 |
+
|
| 23 |
+
# Set environment variable for port
|
| 24 |
+
ENV PORT=7860
|
| 25 |
+
|
| 26 |
+
# Start the application
|
| 27 |
+
CMD ["npm", "start"]
|