mishig HF Staff Claude Sonnet 4.5 commited on
Commit
7432418
·
1 Parent(s): 3d66f6c

feat: add Docker support with bun

Browse files

- Add Dockerfile using official bun image for self-contained builds
- Add .dockerignore to optimize build context
- Update README with Docker deployment instructions
- Configure for HuggingFace Spaces deployment on port 7860

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

Files changed (3) hide show
  1. .dockerignore +10 -0
  2. Dockerfile +38 -0
  3. README.md +24 -0
.dockerignore ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ node_modules
2
+ .next
3
+ .git
4
+ .gitignore
5
+ README.md
6
+ .env*.local
7
+ *.log
8
+ .DS_Store
9
+ .vscode
10
+ .idea
Dockerfile ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM oven/bun:1 AS base
2
+
3
+ # Install apt dependencies
4
+ RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ build-essential \
6
+ cmake \
7
+ git \
8
+ wget \
9
+ ca-certificates \
10
+ libglib2.0-0 \
11
+ libgl1-mesa-glx \
12
+ libegl1-mesa \
13
+ ffmpeg \
14
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Set working directory
17
+ WORKDIR /app
18
+
19
+ # Copy package files
20
+ COPY package.json bun.lock* ./
21
+
22
+ # Install dependencies
23
+ RUN bun install --frozen-lockfile
24
+
25
+ # Copy the rest of the application
26
+ COPY . .
27
+
28
+ # Build the application
29
+ RUN bun run build
30
+
31
+ # Expose port 7860
32
+ EXPOSE 7860
33
+
34
+ # Set environment variable for port
35
+ ENV PORT=7860
36
+
37
+ # Start the application
38
+ CMD ["bun", "start"]
README.md CHANGED
@@ -77,6 +77,30 @@ bun run format
77
 
78
  - `DATASET_URL`: (optional) Base URL for dataset hosting (defaults to HuggingFace Datasets).
79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  ## Contributing
81
 
82
  Contributions, bug reports, and feature requests are welcome! Please open an issue or submit a pull request.
 
77
 
78
  - `DATASET_URL`: (optional) Base URL for dataset hosting (defaults to HuggingFace Datasets).
79
 
80
+ ## Docker Deployment
81
+
82
+ This application can be deployed using Docker with bun for optimal performance and self-contained builds.
83
+
84
+ ### Build the Docker image
85
+
86
+ ```bash
87
+ docker build -t lerobot-visualizer .
88
+ ```
89
+
90
+ ### Run the container
91
+
92
+ ```bash
93
+ docker run -p 7860:7860 lerobot-visualizer
94
+ ```
95
+
96
+ The application will be available at [http://localhost:7860](http://localhost:7860).
97
+
98
+ ### Run with custom environment variables
99
+
100
+ ```bash
101
+ docker run -p 7860:7860 -e DATASET_URL=your-url lerobot-visualizer
102
+ ```
103
+
104
  ## Contributing
105
 
106
  Contributions, bug reports, and feature requests are welcome! Please open an issue or submit a pull request.