Offline Mode
Roboflow Enterprise customers can deploy models offline.
Roboflow Enterprise customers can configure Roboflow Inference, our on-device inference server, to cache weights for up to 30 days.
This allows your model to run completely air-gapped or in locations where an Internet connection is not readily available.
To run your model offline, you need to:
Create and attach a Docker volume to
/tmp/cacheon the your Inference Server.Start a Roboflow Inference server with Docker.
Make a request to your model through the server, which will initiate the model weight download and cache process. You will need an internet connection for this step.
Once your weights have been cached, you can use them locally.
Below, we provide instructions for how to run your model offline on various device types, from CPU to GPU.
Runtime authorization
When you explicitly enable OFFLINE_MODE=True, online Workspace authentication is unavailable. Model cache authorization requires the separate ALLOW_OFFLINE_MODEL_CACHE_AUTH_BYPASS=True opt-in for trusted single-tenant use; see Model Package Security.
The pending runtime-hardening build rejects WORKFLOWS_CUSTOM_PYTHON_EXECUTION_MODE=modal in offline mode instead of silently executing locally. See Security Configuration Migration before upgrading that combination.
CPU
Image: roboflow / roboflow-inference-server-cpu
sudo docker volume create roboflow
sudo docker run -p 127.0.0.1:9001:9001 --mount source=roboflow,target=/tmp/cache roboflow/roboflow-inference-server-cpuIf your deployment uses a Secure Gateway, configure its explicit HTTPS URL and certificate trust using Connecting Inference Servers.
GPU
To use the GPU container, you must first install nvidia-container-runtime.
Image: roboflow / roboflow-inference-server-gpu
Jetson 4.5
Your Jetson Jetpack 4.5 will already have https://github.com/NVIDIA/nvidia-container-runtime installed.
Image: roboflow/roboflow-inference-server-jetson-4.5.0
Jetson 4.6
Your Jetson Jetpack 4.6 will already have https://github.com/NVIDIA/nvidia-container-runtime installed.
Image: roboflow/roboflow-inference-server-jetson-4.6.1
Jetson 5.1
Your Jetson Jetpack 5.1 will already have https://github.com/NVIDIA/nvidia-container-runtime installed.
Image: roboflow/roboflow-inference-server-jetson-5.1.1
Running Inference
With your Inference server set up with local caching, you can run your model on images and video frames without an internet connection.
See Run a model for guidance on how to run your model.
Inference Results
The weights will be loaded from the your Roboflow account over the Internet (via the License Server if you have configured it) with SSL encryption and stored safely in the Docker volume for up to 30 days.
Your inference results will contain a new expiration key you can use to determine how long the Inference Server can continue to provide predictions before renewing its lease on the weights via an Internet or License Server connection. Once the weight expiration date drops below 7 days, the Inference Server will begin trying to renew the weights' lease once per hour until a connection to the Roboflow API is successfully made.
Once the lease has been renewed, the counter will reset to 30 days.
Last updated
Was this helpful?