Skip to main contentDermUnbound
All Posts

Deploying a Local Dermoscopy Model in 5 Minutes

Dr. Yehonatan Kaplan5 min read
dockertutorialdermoscopysetup

Prerequisites

Before you start, you need Docker Desktop installed on your machine. This tutorial works on macOS, Windows, and Linux. You will also need approximately 4 GB of free disk space for the model container and a modern web browser. No GPU is required for inference -- the model runs on CPU, though a GPU will speed things up significantly.

Step 1: Pull the Container Image

The dermoscopy model is packaged as a Docker image hosted on our private registry. Pulling the image downloads the model weights, the inference server, and all dependencies in a single operation. This is a one-time download -- subsequent starts will be instant.

terminal
# Pull the dermoscopy classifier image
$ docker pull dermunbound/derm-classifier:latest

# Verify the image was downloaded
$ docker images | grep derm-classifier
dermunbound/derm-classifier latest a1b2c3d4e5f6 2 days ago 3.8GB

Step 2: Start the Container

Starting the container launches the inference server on port 8080. The --rm flag ensures the container is removed when you stop it, keeping your system clean. The -d flag runs it in detached mode so you get your terminal back.

terminal
# Start the dermoscopy classifier
$ docker run --rm -d -p 8080:8080 --name derm-ai dermunbound/derm-classifier:latest

# Check that it is running
$ docker ps
CONTAINER ID IMAGE STATUS PORTS
a1b2c3d4e5f6 dermunbound/derm-classifier:latest Up 5 seconds 0.0.0.0:8080->8080/tcp

Step 3: Open the Interface

Navigate to http://localhost:8080 in your browser. You will see a drag-and-drop interface for uploading dermoscopy images. The interface is intentionally minimal -- drag an image, get a result. No accounts, no login, no tracking. Classification results include the predicted diagnosis, confidence score, and a heatmap overlay showing which regions of the image influenced the prediction.

Step 4: Test with a Sample Image

The container includes a set of sample dermoscopy images for testing. You can access them through the interface or via the API directly. Testing with known samples helps you verify the installation is working correctly before using it with clinical images.

terminal
# Test the API with a sample image
$ curl -X POST http://localhost:8080/api/classify \
-F "image=@sample_nevus.jpg" \
-H "Accept: application/json"

{"prediction": "melanocytic_nevus", "confidence": 0.94, "alternatives": [...]}

Step 5: Stop the Container

When you are finished, stop the container with a single command. Because we used the --rm flag, the container will be automatically cleaned up. The image remains on your disk, so starting again later is instant -- no re-download needed.

terminal
# Stop the running container
$ docker stop derm-ai

# Verify it has stopped
$ docker ps
CONTAINER ID IMAGE STATUS PORTS

Next Steps

You now have a locally running dermoscopy classifier. From here, you can explore GPU acceleration for faster inference, integrate the API with your existing clinical workflow, or set up Docker Compose to run multiple DermUnbound tools simultaneously. The important thing is that you have taken the first step toward physician-controlled AI: running the model on hardware you own, processing data that never leaves your network.