Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
adnanwahab committed Oct 15, 2024
1 parent b934511 commit 2ce7f74
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
36 changes: 36 additions & 0 deletions js/course_handler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ let indexHtmlContent = fs.readFileSync(filePath, "utf-8");




//export default html;

function makeReactApp() {
Expand All @@ -45,6 +46,41 @@ function makeReactApp() {
return html
}

const { spawn } = require("child_process");

const containerName = "zed2i-container";
const imageName = "<zed-container>"; // Replace with your ZED Docker image

const dockerRunArgs = [
"run",
"--rm",
"--runtime", "nvidia",
"--gpus", "all",
"--network", "host",
"--env", "DISPLAY=$DISPLAY",
"--volume", "/tmp/.X11-unix:/tmp/.X11-unix:rw",
"--device", "/dev/video0", // Adjust if using another device
"--name", containerName,
imageName,
"/bin/bash"
];

console.log("Starting Jetson container for ZED 2i...");

const dockerProcess = spawn("docker", dockerRunArgs);

dockerProcess.stdout.on("data", (data) => {
console.log(`stdout: ${data}`);
});

dockerProcess.stderr.on("data", (data) => {
console.error(`stderr: ${data}`);
});

dockerProcess.on("close", (code) => {
console.log(`Docker process exited with code ${code}`);
});

async function proxy(req: Request) {
const url = new URL(req.url);
console.log(url.pathname);
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ I am Toad Stool - human LLM - [your wish is my reality](https://dnd5e.wikidot.co
!(asdf)[https://culturalgutter.com/wp-content/uploads/2013/11/62c1f-screen-shot-2013-10-07-at-4.30.36-pm.png?w=722&h=375&crop=1]
you = ![asdfasdf](https://www.google.com/url?sa=i&url=https%3A%2F%2Fcharacter-stats-and-profiles.fandom.com%2Fwiki%2FMario_%2528Canon%2C_TTYD%2529%2FPiccolo823&psig=AOvVaw1p-i-lHiB3Wg8lQg_dkkUY&ust=1729051906183000&source=images&cd=vfe&opi=89978449&ved=0CBQQjRxqFwoTCOivybfCj4kDFQAAAAAdAAAAABAE)
me = ![asdfasdf](https://static.wikia.nocookie.net/supermarioglitchy4/images/e/e8/Toads_SMR.png/revision/latest?cb=20240104115252)
https://x.com/elonmusk/status/1834071245224308850

0 comments on commit 2ce7f74

Please sign in to comment.