### Install Python Dependencies for Manual Setup Source: https://github.com/anindyadeep/litefold/blob/main/README.md Installs required Python packages listed in requirements.txt for running LiteFold without Docker. ```bash pip install -r requirements.txt ``` -------------------------------- ### Start LiteFold Server Manually Source: https://github.com/anindyadeep/litefold/blob/main/README.md Launches the LiteFold server using the selfhosted.py script after installing dependencies. ```bash python selfhosted.py ``` -------------------------------- ### Clone and Run LiteFold with Docker Source: https://github.com/anindyadeep/litefold/blob/main/README.md Starts the LiteFold server in a Docker container with GPU support, exposing port 7114 and mounting volumes for results and database. Model weights are downloaded on first run. ```bash # Clone the repository git clone https://github.com/Anindyadeep/litefold cd litefold/litefold # Start the container (will download model weights on first run) docker build -t litefold -f selfhosted.Dockerfile . docker run -d --gpus all -p 7114:7114 -v litefold_results:/data/results -v litefold_db:/data/db litefold ``` -------------------------------- ### GET /health Source: https://github.com/anindyadeep/litefold/blob/main/README.md Checks the health of the server. This endpoint returns the server's health status, typically used for monitoring and uptime checks. ```APIDOC ## [GET] /health ### Description Checks the health of the server. This endpoint returns the server's health status, typically used for monitoring and uptime checks. ### Method GET ### Endpoint /health ### Response #### Success Response (200) - Response body indicates the server health status. ``` -------------------------------- ### Configure ngrok authtoken Source: https://github.com/anindyadeep/litefold/blob/main/README.md Adds your ngrok authtoken to the local ngrok configuration. Required before creating a tunnel. ```bash ngrok config add-authtoken YOUR_AUTH_TOKEN ``` -------------------------------- ### GET /successful-jobs/{user_id} Source: https://github.com/anindyadeep/litefold/blob/main/README.md Lists all successful jobs for a given user. This endpoint takes a user ID as a path parameter and returns a list of jobs that have completed successfully. ```APIDOC ## [GET] /successful-jobs/{user_id} ### Description Lists all successful jobs for a given user. This endpoint takes a user ID as a path parameter and returns a list of jobs that have completed successfully. ### Method GET ### Endpoint /successful-jobs/{user_id} ### Parameters #### Path Parameters - **user_id** (string) - Required - The identifier of the user whose successful jobs are to be listed ### Response #### Success Response (200) - Response body contains a list of successful jobs for the user. ``` -------------------------------- ### Check job status via REST API Source: https://github.com/anindyadeep/litefold/blob/main/README.md Sends a GET request to the /status/{job_id} endpoint to retrieve the status of a prediction job. Prints the JSON response. ```python job_id = "example-job-123" status_url = f"http://localhost:8000/status/{job_id}" response = requests.get(status_url) print(response.json()) ``` -------------------------------- ### Create ngrok tunnel to local server Source: https://github.com/anindyadeep/litefold/blob/main/README.md Exposes the local server on port 7114 to the internet via ngrok, providing a public URL. ```bash ngrok http 7114 ``` -------------------------------- ### GET /status/{job_id} Source: https://github.com/anindyadeep/litefold/blob/main/README.md Checks the status of a previously submitted prediction job. This endpoint takes a job ID as a path parameter and returns the current status of that job. ```APIDOC ## [GET] /status/{job_id} ### Description Checks the status of a previously submitted prediction job. This endpoint takes a job ID as a path parameter and returns the current status of that job. ### Method GET ### Endpoint /status/{job_id} ### Parameters #### Path Parameters - **job_id** (string) - Required - The unique identifier of the job to check ### Response #### Success Response (200) - Response body contains the job status information. ### Request Example ```python job_id = "example-job-123" status_url = f"http://localhost:8000/status/{job_id}" response = requests.get(status_url) print(response.json()) ``` ``` -------------------------------- ### POST /predict Source: https://github.com/anindyadeep/litefold/blob/main/README.md Submits a new protein structure prediction job. This endpoint accepts a job payload with sequence and model information and returns a response confirming the job submission. ```APIDOC ## [POST] /predict ### Description Submits a new protein structure prediction job. This endpoint accepts a job payload with sequence and model information and returns a response confirming the job submission. ### Method POST ### Endpoint /predict ### Parameters #### Request Body - **job_id** (string) - Required - Unique identifier for the job - **job_name** (string) - Required - Name of the job - **model** (string) - Required - Model to use for prediction (e.g., esmfold_3B_v1) - **sequence** (string) - Required - Amino acid sequence to predict - **user_id** (string) - Required - Identifier of the user submitting the job ### Response #### Success Response (200) - Response body contains the result of the prediction job submission. ### Request Example ```python import requests import json url = "http://localhost:7114/predict" payload = { "job_id": "example-job-123", "job_name": "Hemoglobin Alpha", "model": "esmfold_3B_v1", "sequence": "MVHLTPEEKSAVTALWGKVNVDEVGGEALGRLLVVYPWTQRFFESFGDLSTPDAVMGNPKVKAHGKKVLGAFSDGLAHLDNLKGTFATLSELHCDKLHVDPENFRLLGNVLVCVLAHHFGKEFTPPVQAAYQKVVAGVANALAHKYH", "user_id": "user-123" } response = requests.post(url, json=payload) print(response.json()) ``` ``` -------------------------------- ### Submit prediction job via REST API Source: https://github.com/anindyadeep/litefold/blob/main/README.md Sends a POST request to the /predict endpoint with job details and protein sequence. Prints the JSON response. ```python import requests import json url = "http://localhost:7114/predict" payload = { "job_id": "example-job-123", "job_name": "Hemoglobin Alpha", "model": "esmfold_3B_v1", "sequence": "MVHLTPEEKSAVTALWGKVNVDEVGGEALGRLLVVYPWTQRFFESFGDLSTPDAVMGNPKVKAHGKKVLGAFSDGLAHLDNLKGTFATLSELHCDKLHVDPENFRLLGNVLVCVLAHHFGKEFTPPVQAAYQKVVAGVANALAHKYH", "user_id": "user-123" } response = requests.post(url, json=payload) print(response.json()) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.