πxel
πxel
Explore posts from servers
RRunPod
Created by maya007 on 2/29/2024 in #⛅|pods
Is it possible to restart the pod using manage Pod GraphQL API?
yes, i was able to fake a restart by doing a edit/update call without changing details, which in return will cause a restart nodejs example:
/** */
restartPod: async function({ id }: { id: string }) {
const response = await fetch(
`https://api.runpod.io/graphql?api_key=${}`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
operationName: "editPodJob",
variables: {
input: {
podId: id,
imageName: "runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04",
containerDiskInGb: 20,
volumeInGb: 20,
},
},
query: `
mutation editPodJob($input: PodEditJobInput!) {
podEditJob(input: $input) {
id
}
}`,
}),
},
)
const res = await response.json()
return res
},
/** */
restartPod: async function({ id }: { id: string }) {
const response = await fetch(
`https://api.runpod.io/graphql?api_key=${}`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
operationName: "editPodJob",
variables: {
input: {
podId: id,
imageName: "runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04",
containerDiskInGb: 20,
volumeInGb: 20,
},
},
query: `
mutation editPodJob($input: PodEditJobInput!) {
podEditJob(input: $input) {
id
}
}`,
}),
},
)
const res = await response.json()
return res
},
7 replies
RRunPod
Created by maya007 on 2/29/2024 in #⛅|pods
Is it possible to restart the pod using manage Pod GraphQL API?
but this will introduce a risc of loosing the pod during the time between stop and start right when you restart from the webui i will just restart the docker container without stopping the whole thing however i am wondering how to do this as a api user, since the api https://hapi.runpod.net/v1/pod/${id}/restart seems to not work with the api key auth
7 replies
RRunPod
Created by πxel on 2/23/2024 in #⛅|pods
pod does not show public ip & ports
okay turns out the pod was not running since there was no entrypoint / command configured was not transparent that the pod is actually not running, since it did not show as exited however, solved by providing such
4 replies