Skip to content

Commit 3dc0e66

Browse files
authored
Merge branch 'main' into webui-plugin
2 parents 5beb7fc + 9f35bf3 commit 3dc0e66

2 files changed

Lines changed: 78 additions & 0 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
3+
{
4+
"name": "StableStudio dev",
5+
"image": "mcr.microsoft.com/devcontainers/typescript-node:0-18",
6+
// avoid git "dubious ownership" errors, which break yarn
7+
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder} && yarn install",
8+
"customizations": {
9+
"vscode": {
10+
"settings": {},
11+
"extensions": [
12+
"vscode.typescript-language-features"
13+
]
14+
}
15+
},
16+
"features": {
17+
"ghcr.io/devcontainers/features/github-cli:1": {
18+
19+
}
20+
},
21+
"portsAttributes": {
22+
"3000": {
23+
"label": "Application",
24+
"onAutoForward": "openBrowserOnce"
25+
}
26+
}
27+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
3+
{
4+
"name": "StableStudio+WebUI GPU dev",
5+
"image": "mcr.microsoft.com/devcontainers/typescript-node:0-18",
6+
"postCreateCommand": "cd /home/node && git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git webui && cd webui && python -m venv ~/.webui-venv && bash -c 'source ~/.webui-venv/bin/activate' && pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118 && pip install -r requirements_versions.txt",
7+
// avoid git "dubious ownership" errors, which break yarn
8+
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder} && yarn",
9+
"postAttachCommand": "echo 'To start the backend, run: cd ~/webui; ./webui.sh'",
10+
"customizations": {
11+
"vscode": {
12+
"settings": {
13+
"python.defaultInterpreterPath": "/home/node/.webui-venv/stability-generator/bin/python"
14+
},
15+
"extensions": [
16+
"vscode.typescript-language-features"
17+
]
18+
}
19+
},
20+
"features": {
21+
"ghcr.io/devcontainers/features/nvidia-cuda:1": {
22+
"cudaVersion": "11.8",
23+
"installCudnn": true,
24+
"installNvtx": true
25+
},
26+
"ghcr.io/devcontainers/features/python:1": {
27+
"version": "3.10.6"
28+
},
29+
"ghcr.io/devcontainers-contrib/features/apt-get-packages:1": {
30+
"packages": "libgl1-mesa-glx"
31+
},
32+
"ghcr.io/devcontainers/features/github-cli:1": {
33+
34+
}
35+
},
36+
"remoteEnv": {
37+
"COMMANDLINE_ARGS": "--nowebui --cors-allow-origins=http://localhost:3000",
38+
"venv_dir": "/home/node/.webui-venv"
39+
},
40+
"runArgs": ["--gpus", "all"],
41+
"portsAttributes": {
42+
"3000": {
43+
"label": "Application",
44+
"onAutoForward": "openBrowserOnce"
45+
},
46+
"7861": {
47+
"label": "Backend",
48+
"onAutoForward": "ignore"
49+
}
50+
}
51+
}

0 commit comments

Comments
 (0)