Spaces:
Paused
Paused
VSCode saves things to `/data` when it exists
#3
by
multimodalart
HF staff
- opened
- Dockerfile +2 -0
- start_server.sh +6 -2
Dockerfile
CHANGED
@@ -104,6 +104,8 @@ RUN --mount=target=/root/packages.txt,source=packages.txt \
|
|
104 |
RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
|
105 |
bash /root/on_startup.sh
|
106 |
|
|
|
|
|
107 |
#######################################
|
108 |
# End root user section
|
109 |
#######################################
|
|
|
104 |
RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
|
105 |
bash /root/on_startup.sh
|
106 |
|
107 |
+
RUN mkdir /data && chown user:user /data
|
108 |
+
|
109 |
#######################################
|
110 |
# End root user section
|
111 |
#######################################
|
start_server.sh
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
-
|
|
|
4 |
|
5 |
-
|
|
|
|
|
|
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
+
# Default workspace directory
|
4 |
+
WORKSPACE_DIR="/data"
|
5 |
|
6 |
+
echo "Starting VSCode Server on $WORKDIR_PATH..."
|
7 |
+
|
8 |
+
# Use the determined directory as the base path for the VS Code server
|
9 |
+
exec /app/openvscode-server/bin/openvscode-server --host 0.0.0.0 --port 7860 --without-connection-token "${@}" --extensions-dir "$WORKDIR_PATH/.vscode-server/extensions" --user-data-dir "$WORKDIR_PATH/.vscode-server/data" --
|