> This page is for OpenFold3, version 1.7.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 1.7.0 (Latest) (default): https://docs.nvidia.com/nim/bionemo/openfold3/1.7.0/llms.txt
> - 1.6.0: https://docs.nvidia.com/nim/bionemo/openfold3/1.6.0/llms.txt
> - 1.5.0: https://docs.nvidia.com/nim/bionemo/openfold3/1.5.0/llms.txt
> - 1.4.0: https://docs.nvidia.com/nim/bionemo/openfold3/1.4.0/llms.txt
> - 1.3.0: https://docs.nvidia.com/nim/bionemo/openfold3/1.3.0/llms.txt
> - 1.2.0: https://docs.nvidia.com/nim/bionemo/openfold3/1.2.0/llms.txt
> - 1.1.0: https://docs.nvidia.com/nim/bionemo/openfold3/1.1.0/llms.txt
> - 1.0.0: https://docs.nvidia.com/nim/bionemo/openfold3/1.0.0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nim/bionemo/llms.txt.

# Quickstart for OpenFold3

> Pull the OpenFold3 NIM container, start the service, monitor its health, run your first structure-prediction request, and stop the container.

This section describes how to get the OpenFold3 NIM up and running.

1. Pull and run the NIM
2. Submit health check requests to the NIM
3. Run inference
4. Stop the container

<Note>
This page assumes you have installed and set up [Prerequisite Software](/nim/bionemo/openfold3/get-started/prerequisites) (Docker and the NVIDIA Container Toolkit).
</Note>

## Pull and Run the NIM

To pull and run the OpenFold3 NIM, complete the following steps:

1. Pull the NIM container.

   ```bash
   docker pull nvcr.io/nim/openfold/openfold3:latest
   ```
   

2. Run the NIM container and expose port 8000, to which the user can submit requests.

   Set the `LOCAL_NIM_CACHE` environment variable to a location on the local filesystem, on a disk with at least 15 GB of space. Initially, the following command downloads model parameter sets to this location. On subsequent executions, the following command checks for the presence of the data, and only repeats the download if the data is not found.

   <Note>
   This download is approximately 2.3 GB.
   </Note>

   The container runs as UID/GID 1000 (`nvs`). The cache must be writable by that user. Leave the container user unchanged so the service can create `/opt/nim/workspace`. Refer to [Set Up Your NIM Cache](/nim/bionemo/openfold3/get-started/prerequisites#set-up-your-nim-cache).

   ```bash
   export LOCAL_NIM_CACHE=~/.cache/nim
   mkdir -p "$LOCAL_NIM_CACHE"
   chmod 700 "$LOCAL_NIM_CACHE"
   if [ "$(id -u)" -ne 1000 ]; then
     sudo chown 1000:1000 "$LOCAL_NIM_CACHE"
   fi
   ```

   ```bash
   docker run --rm --name openfold3 \
       --runtime=nvidia \
       --gpus 'device=0' \
       -p 8000:8000 \
       -v $LOCAL_NIM_CACHE:/opt/nim/.cache \
       --shm-size=16g \
       nvcr.io/nim/openfold/openfold3:latest
   ```
   

## Submit Health-Check Requests to the NIM as It Starts Up

To monitor the NIM as it starts up, complete the following steps:

1. Open a new terminal, leaving the current terminal open with the launched service.

2. Submit requests to the health check endpoint until you see `{"object":"health.response","message":"ready","status":"ready"}`.

   The NIM takes less than 3 minutes to start up and download the needed data files.

   ```bash
   curl -X 'GET' \
       'http://localhost:8000/v1/health/ready' \
       -H 'accept: application/json'
   ```

   You can also check the NIM's status with Python by using the `requests` module, installed using `pip install requests`.

   ```python
   import requests

   url = "http://localhost:8000/v1/health/ready"  # Replace with the actual URL
   headers = {"content-type": "application/json"}

   try:
       response = requests.get(url, headers=headers)

       # Check if the request was successful
       if response.ok:
           print("Request succeeded:", response.json())
       else:
           print("Request failed:", response.status_code, response.text)
   except Exception as E:
       print("Request failed:", E)
   ```

   When the response, `{"object":"health.response","message":"ready","status":"ready"}`, appears, the NIM is ready to accept a request with real inputs.

## Run Inference

Refer to [OpenFold3 NIM Example Requests](/nim/bionemo/openfold3/example-requests) for an example inference with realistic input.

## Stop the Container

When you are done, press `Ctrl+C` in the terminal running the container, or run `docker stop` with the container name set by the `--name` option of the `docker run` command. Because the command uses `--rm`, Docker removes the container after it stops.