feat: Added GPU support feature for Remote Server with setup and status checks, including API endpoints and utility functions

This commit is contained in:
vishalkadam47
2024-11-02 15:15:58 +05:30
parent 3e467959c9
commit 1b6d8d803b
8 changed files with 361 additions and 46 deletions

View File

@@ -1,34 +1,34 @@
import {
generateHash,
generateRandomDomain,
type Template,
type Schema,
type DomainSchema,
type DomainSchema,
type Schema,
type Template,
generateHash,
generateRandomDomain,
} from "../utils";
export function generate(schema: Schema): Template {
const mainServiceHash = generateHash(schema.projectName);
const mainDomain = generateRandomDomain(schema);
const mainServiceHash = generateHash(schema.projectName);
const mainDomain = generateRandomDomain(schema);
const domains: DomainSchema[] = [
{
host: mainDomain,
port: 3000,
serviceName: "blender",
},
];
const domains: DomainSchema[] = [
{
host: mainDomain,
port: 3000,
serviceName: "blender",
},
];
const envs = [
`PUID=1000`,
`PGID=1000`,
`TZ=Etc/UTC`,
`SUBFOLDER=/`,
`NVIDIA_VISIBLE_DEVICES=all`,
`NVIDIA_DRIVER_CAPABILITIES=all`,
];
const envs = [
`PUID=1000`,
`PGID=1000`,
`TZ=Etc/UTC`,
`SUBFOLDER=/`,
`NVIDIA_VISIBLE_DEVICES=all`,
`NVIDIA_DRIVER_CAPABILITIES=all`,
];
return {
envs,
domains,
};
return {
envs,
domains,
};
}