File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212 // Features to add to the dev container. More info: https://containers.dev/features.
1313 "features" : {
14- "ghcr.io/devcontainers/features/python:1" : {}
14+ "ghcr.io/devcontainers/features/python:1" : {
15+ // "version": "3.10"
16+ }
1517 },
1618
1719 // Use 'forwardPorts' to make a list of ports inside the container available locally.
1820 "forwardPorts" : [8000 ],
1921
2022 // Uncomment the next line to run commands after the container is created.
21- "postCreateCommand" : " conda activate xformers " ,
23+ "postCreateCommand" : " scripts/devContainerPostCreate.sh " ,
2224
2325 "customizations" : {
2426 "vscode" : {
2527 "extensions" : [
2628 " ryanluker.vscode-coverage-gutters" ,
27- " fsevenm.run-it-on"
28- ]
29+ " fsevenm.run-it-on" ,
30+ " ms-python.black-formatter" ,
31+ ],
32+ "settings" : {
33+ "python.pythonPath" : " /opt/conda/bin/python"
34+ }
2935 }
3036 },
3137
3844
3945 "runArgs" : [
4046 " --gpus" ,
41- " all"
47+ " all" ,
48+ " --env-file" ,
49+ " .devcontainer/local.env"
4250 ]
4351}
Original file line number Diff line number Diff line change 1+ # Useful environment variables:
2+
3+ # AWS or S3-compatible storage credentials and buckets
4+ AWS_ACCESS_KEY_ID =
5+ AWS_SECRET_ACCESS_KEY =
6+ AWS_DEFAULT_REGION =
7+ AWS_S3_DEFAULT_BUCKET =
8+ # Only fill this in if your (non-AWS) provider has told you what to put here
9+ AWS_S3_ENDPOINT_URL =
10+
11+ # To use a proxy, e.g.
12+ # https://github.com/kiri-art/docker-diffusers-api/blob/dev/CONTRIBUTING.md#local-https-caching-proxy
13+ # DDA_http_proxy=http://172.17.0.1:3128
14+ # DDA_https_proxy=http://172.17.0.1:3128
15+
16+ # HuggingFace credentials
17+ HF_AUTH_TOKEN =
18+ HF_USERNAME =
19+
Original file line number Diff line number Diff line change @@ -130,3 +130,4 @@ dmypy.json
130130permutations
131131tests /output
132132node_modules
133+ .devcontainer /local.env
Original file line number Diff line number Diff line change 33 " --cov=." ,
44 " --cov-report=xml" ,
55 " --ignore=test.py" ,
6+ " --ignore=tests/integration" ,
7+ " --ignore=diffusers" ,
68 // "unit_tests.py"
79 // "."
810 ],
911 "python.testing.unittestEnabled" : false ,
1012 "python.testing.pytestEnabled" : true ,
11- "python.defaultInterpreterPath" : " /opt/conda/envs/xformers/bin/python" ,
13+ // "python.defaultInterpreterPath": "/opt/conda/envs/xformers/bin/python",
14+ "python.defaultInterpreterPath" : " /opt/conda/bin/python" ,
1215 "runItOn" : {
1316 "commands" : [
1417 {
Original file line number Diff line number Diff line change 1+ {
2+ // See https://go.microsoft.com/fwlink/?LinkId=733558
3+ // for the documentation about the tasks.json format
4+ "version" : " 2.0.0" ,
5+ "tasks" : [
6+ {
7+ "label" : " Watching Server" ,
8+ "type" : " shell" ,
9+ "command" : " scripts/devContainerServer.sh"
10+ }
11+ ]
12+ }
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # devcontainer.json postCreateCommand
4+
5+ echo
6+ echo Initialize conda bindings for bash
7+ conda init bash
8+
9+ echo Activating
10+ source /opt/conda/bin/activate base
11+
12+ echo Installing dev dependencies
13+ pip install watchdog
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ source /opt/conda/bin/activate base
4+
5+ ln -sf /api/diffusers .
6+
7+ watchmedo auto-restart --recursive -d api python api/server.py
You can’t perform that action at this time.
0 commit comments