> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wuji.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Docker Deployment

Run Wuji SDK applications in Linux Docker containers to keep the application and SDK dependencies in a separate environment. A container can connect to devices through the host network and share the host's SDK user data. Configure network access and data mounts for your application to use device connection, data subscription, device-supported control, parameters, and recording. See the [Wuji SDK Reading Guide](https://docs.wuji.tech/docs/en/wuji-sdk/latest/index.md) for API usage.

## Prepare the Environment

Install [Docker Engine](https://docs.docker.com/engine/install/ubuntu/) on the Linux host, then run `docker version` to check that both the client and server are available. The image uses Ubuntu 22.04 and Python 3.10. The default container user is `wuji`, with UID and GID both set to 1000.

Connect and power the device as described in the [Wuji Hand 2 hardware walkthrough](https://docs.wuji.tech/docs/en/wuji-hand/latest/quick-start.md#real-device-run) or [Wuji Glove setup](https://docs.wuji.tech/docs/en/wuji-glove/latest/getting-started.md). Confirm the host can discover it using [Device Discovery and Connection](https://docs.wuji.tech/docs/en/wuji-sdk/latest/device-connection.md). Put the host network adapter on the same subnet as the device IP and allow UDP broadcasts and SDK traffic.

## Build and Update

Clone the [public Wuji SDK repository](https://github.com/wuji-technology/wuji-sdk) and build the image with its [Dockerfile](https://github.com/wuji-technology/wuji-sdk/blob/main/docker/Dockerfile):

```bash theme={null}
git clone https://github.com/wuji-technology/wuji-sdk.git
cd wuji-sdk/docker
docker build --pull --no-cache -t wuji-sdk:local .
```

The image installs the latest stable SDK from PyPI at build time. Existing images keep their installed SDK version. Starting a container doesn't update the SDK. After building, check the version and record the image ID:

```bash theme={null}
docker image inspect wuji-sdk:local --format '{{.Id}}'
docker run --rm wuji-sdk:local python -m pip show wuji-sdk
```

Before updating an existing image, run `docker image tag wuji-sdk:local wuji-sdk:rollback` to keep a rollback tag, then rebuild with `--pull --no-cache`.

## Run the Application

Follow the public repository's [Docker README](https://github.com/wuji-technology/wuji-sdk/blob/main/docker/README.md) to start the container, mount the repository's Python examples, and run a read-only subscription example. The README provides run commands and permission setup for Ethernet and USB devices.

`--network host` preserves the broadcasts needed to discover Ethernet devices. Mount the host's `~/.wuji` at `/home/wuji/.wuji` in the container to retain user profiles, calibration data, and logs. This directory and its existing files must allow the container user (UID/GID 1000) to read and write.

## Use SDK Capabilities

Applications in the container can use the SDK installed in the image. Provide the resources needed for the APIs your application uses:

| SDK Capability | Container Resource | Reference |
| - | - | - |
| Device connection, data subscription, and supported control | Host network access to the device. Stop other applications using the target device before taking control | [Device Discovery and Connection](https://docs.wuji.tech/docs/en/wuji-sdk/latest/device-connection.md), [Data Subscription](https://docs.wuji.tech/docs/en/wuji-sdk/latest/data-subscription.md) |
| Parameter access, SDK users, and calibration data | Read and write access to the host's `~/.wuji` directory | [Device Parameters and User Data](https://docs.wuji.tech/docs/en/wuji-sdk/latest/device-params.md) |
| Data recording and offline processing | Mount a writable host directory in the container and have the recording application write files there | [Data Recording and Offline Processing](https://docs.wuji.tech/docs/en/wuji-sdk/latest/data-recording.md) |

## Recover and Diagnose

If an update causes connection problems, replace `wuji-sdk:local` in the run command with `wuji-sdk:rollback`. Keep the same data-directory mount, then check SDK import, device discovery, and read-only data.

For technical support, provide the image ID, SDK/Python versions, host architecture, Docker version, device firmware, and failing steps. On Jetson, include the model and JetPack/L4T version.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.