@@ -7,16 +7,16 @@ A driver to run python code in a wasm environment, almost like running vanilla p
77
88
99
10+ Here we assume a file ` main.py ` located at ` ~/foo/bar/main.py ` .
1011
1112``` bash
12- # run in node backend
1313pyjs_code_runner run script \
1414 node \
15- --conda-env /home/web_user/env ` # the emscripten-forge env in which to run the code` \
16- --mount ~ /src/pyjs/tests:/tests ` # Mount path to virtual filesytem <HOST_MACHINE_PATH>:<TARGET_PATH>` \
17- --script main.py ` # Path of the script to run (in virtual filesystem)` \
18- --work-dir /tests ` # Work directory in the virtual fileystem` \
19- --async-main ` # should a top-level async main function be called`
15+ --conda-env ~ /micromamba/envs/my_env ` # the emscripten-forge env in which to run the code` \
16+ --mount ~ /foo/bar:/home/web_user/fubar ` # Mount path to virtual filesytem <HOST_MACHINE_PATH>:<TARGET_PATH>` \
17+ --script main.py ` # Path of the script to run (in virtual filesystem)` \
18+ --work-dir /home/web_user/fubar ` # Work directory in the virtual fileystem` \
19+ --async-main ` # should a top-level async main function be called`
2020
2121```
2222
@@ -26,8 +26,8 @@ pyjs_code_runner run script \
2626# in a headless fashion
2727pyjs_code_runner run script \
2828 browser-main \
29- --conda-env /home/web_user/env \
30- --mount ~ /src/pyjs/tests:/tests \
29+ --conda-env ~ /micromamba/envs/my_env \
30+ --mount ~ /foo/bar:/home/web_user/fubar \
3131 --script main.py \
3232 --work-dir /tests \
3333 --async-main \
@@ -40,9 +40,9 @@ pyjs_code_runner run script \
4040# run in browser-worker-thread backend
4141# in a headless fashion
4242pyjs_code_runner run script \
43- browser-worker \
44- --conda-env /home/web_user/env \
45- --mount ~ /src/pyjs/tests:/tests \
43+ browser-worker \
44+ --conda-env ~ /micromamba/envs/my_env \
45+ --mount ~ /foo/bar:/home/web_user/fubar \
4646 --script main.py \
4747 --work-dir /tests \
4848 --async-main \
0 commit comments