Skip to main content

How-To Guides

Choose a setup​

SetupWhat you install on the server machineStart here
Docker, recommended for a first conversationDocker Engine/Desktop with ComposeNatural-language tutorial
Native Linux/WSLPython 3.11+, uv, a C toolchain, and JDK 21Native setup
Existing model host or external MCP clientA reachable model supporting tool calling, plus the running SMART serverConnect a client

The Docker route needs no host Java installation, host Cetus checkout, Ollama service, or API key for direct REST optimization and classical profiling. Docker builds Cetus with JDK 21 and runs it with a Java 21 runtime.

Keep the native Cetus installation path free of spaces, including all parent directories. Its upstream build scripts and generated launcher do not support spaces in that path. SMART's project, input, profile, and result paths can contain spaces when quoted; see the native build instructions.

For native Linux/WSL, complete the native setup first. With the server running on port 8000, run shell examples through uv so they can find the project's Python interpreter:

SMART_URL=http://127.0.0.1:8000 uv run bash Testing_Examples/run_01_vector_scale.sh

On macOS, native Cetus optimization can fail while preprocessing Apple SDK system headers, including inputs that use <stdio.h>. A successful /health response does not verify this compiler step. Use the Docker setup for affected inputs; see the native macOS preprocessing limitation for the observed errors.

Complete a specific task​

TaskGuide
Build images, mount source files, or manage persistent resultsRun with Docker
Install and run without DockerRun natively
Use the CLI, Ollama, another model host, or an external MCP clientConnect a client
Submit a profiling task, check its status, and retrieve its report in PostmanProfile with Postman
Add a custom optimization profileCustomize profiles
Diagnose Java, networking, path, profile, or parsing errorsTroubleshooting

Where are my source files?​

MCP file tools run inside the SMART server, so paths in prompts must be visible to that server.

SourcePath used by the server
Checked-in examples in the Docker image/app/Testing_Examples/01_vector_scale.c
Your directory mounted into the serverThe mount destination you choose, such as /workspace/input/main.c
Native serverAn absolute path on the machine running the server

/examples is not a built-in alias. Mounting files only into a client container does not make them available to the server.

For REST requests, curl -F 'file=@main.c' reads main.c where curl runs and uploads its contents; a source mount is unnecessary. See Docker source mounts.