Deploy a virtual server with SSH access for full flexibility.
A full example in python can be found
Authenticate to the API
Authenticate to the API to generate the necessary headers
class Authentication:
@staticmethod
def log_in(username, password):
# Log in to get a JWT token (expires in 12 hours)
response = requests.post(
"https://api.computex.ai/api/v1/users/login",
headers={"accept": "application/json",
"Content-Type": "application/json"
},
json={"email": username, "password": password},
)
if response.status_code != 200:
raise Exception("Log in failed.")
token = response.json()["token"]
return token
@staticmethod
def generate_headers(token):
headers = {
"accept": "application/json",
"Authorization": f"Bearer {token}"
}
return headers
Set the build configuration
The build configuration can be adjusted to match the exact specs required.
The example below creates a 8 node GPU build using the NVIDIA RTX A600 for training. Set the name, username, and password to the desired values for your project.