Skip to content

Commit

Permalink
removed init hacks and moved that into the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
stebo85 committed Oct 29, 2024
1 parent f12db21 commit 0f91ebf
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/main/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ function createLaunchScript(
let volumeCreate = `${isPodman ? `${volumeCheck}` : ''}`;

let machineCmd = '';
if (isPodman && process.platform == 'darwin' && serverInfo.workingDirectory) {
machineCmd = `podman machine reset -f && podman machine init --rootful --now -v ${serverInfo.workingDirectory}:${serverInfo.workingDirectory} -v $HOME:$HOME podman-machine-default`;
}
// if (isPodman && process.platform == 'darwin') {
// machineCmd = `podman machine reset -f && podman machine init --rootful --now -v /Volumes:/Volumes -v $HOME:$HOME podman-machine-default`;
// }

let launchArgs = [
`${engineCmd} run -d --rm --shm-size=1gb -it --privileged --user=root --name neurodeskapp-${strPort} -p ${strPort}:${strPort} ` +
Expand All @@ -106,7 +106,7 @@ function createLaunchScript(
const tag = config.ConfigToml.jupyter_neurodesk_version;

if (serverInfo.workingDirectory) {
launchArgs.push(` -v ${serverInfo.workingDirectory}:/data`);
launchArgs.push(` --volume ${serverInfo.workingDirectory}:/data`);
}

for (const arg of serverLaunchArgsFixed) {
Expand Down Expand Up @@ -464,17 +464,17 @@ export class JupyterServer {
execFile(`${engineCmd} rm -f neurodeskapp-${this._info.port}`, {
shell: '/bin/bash'
});
if (
process.platform === 'darwin' &&
this._info.engine === EngineType.Podman
) {
execFile(
`${engineCmd} machine stop podman-machine-default && ${engineCmd} machine rm podman-machine-default`,
{
shell: '/bin/bash'
}
);
}
// if (
// process.platform === 'darwin' &&
// this._info.engine === EngineType.Podman
// ) {
// execFile(
// `${engineCmd} machine stop podman-machine-default && ${engineCmd} machine rm podman-machine-default`,
// {
// shell: '/bin/bash'
// }
// );
// }
this._shutdownServer()
.then(() => {
this._stopping = false;
Expand Down

0 comments on commit 0f91ebf

Please sign in to comment.