Merge pull request #2 from coder3101/add-dockerfile
feat: Add Dockerfile and compose with usage instructions
This commit is contained in:
@@ -46,6 +46,8 @@ Requirements:
|
||||
- Python 3.11+
|
||||
- Node.js 18+
|
||||
|
||||
### Native
|
||||
|
||||
```bash
|
||||
git clone https://github.com/extraltodeus/j-wash.git
|
||||
cd j-wash
|
||||
@@ -63,6 +65,51 @@ python -X utf8 run.py
|
||||
|
||||
Then open **http://localhost:8381**.
|
||||
|
||||
### Docker
|
||||
|
||||
Requirements:
|
||||
- NVIDIA GPU with CUDA 12.4+ drivers
|
||||
- [Docker](https://docs.docker.com/engine/install/) with the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)
|
||||
|
||||
```bash
|
||||
# Build the image
|
||||
docker build -t j-wash .
|
||||
|
||||
# Run (data and HF cache persist on the host)
|
||||
docker run --gpus all \
|
||||
-p 8381:8381 \
|
||||
-v ./data:/app/data \
|
||||
-v ./hf_cache:/app/hf_cache \
|
||||
-v ./lenses:/app/lenses \
|
||||
j-wash
|
||||
```
|
||||
|
||||
Or use Docker Compose:
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
The container binds to `0.0.0.0` by default so the UI is reachable from outside
|
||||
the container. Pass additional arguments (e.g. `--port`, `--host`) after the image
|
||||
name:
|
||||
|
||||
```bash
|
||||
docker run --gpus all -p 8381:8381 j-wash --port 8381 --host 0.0.0.0
|
||||
```
|
||||
|
||||
Set `HF_TOKEN` for gated/private models:
|
||||
|
||||
```bash
|
||||
docker run --gpus all -p 8381:8381 -e HF_TOKEN=hf_your_token j-wash
|
||||
# or with docker-compose:
|
||||
# HF_TOKEN=hf_your_token docker compose up -d
|
||||
```
|
||||
|
||||
> **Note**: The Docker image includes the `jacobian-lens` library and pre-builds the
|
||||
> React front-end at build time. Model weights are downloaded at runtime into the
|
||||
> mounted `hf_cache` volume (shared with the host).
|
||||
|
||||
|
||||
## Running
|
||||
|
||||
|
||||
Reference in New Issue
Block a user