Spaces:
Runtime error
Runtime error
fixed
Browse files- Dockerfile +5 -2
- start_server.sh +3 -4
Dockerfile
CHANGED
@@ -48,13 +48,16 @@ WORKDIR /root/app
|
|
48 |
|
49 |
# Python packages
|
50 |
COPY requirements.txt .
|
51 |
-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
|
|
|
|
|
52 |
|
53 |
# Copy the current directory contents into the container at /root/app
|
54 |
COPY . /root/app
|
55 |
|
56 |
# Copy rclone configuration
|
57 |
-
COPY rclone.conf /root/.config/rclone/rclone.conf
|
58 |
|
59 |
RUN chmod +x start_server.sh
|
60 |
|
|
|
48 |
|
49 |
# Python packages
|
50 |
COPY requirements.txt .
|
51 |
+
RUN /root/miniconda/bin/pip install --no-cache-dir --upgrade -r requirements.txt
|
52 |
+
|
53 |
+
# Ensure jupyter lab is in PATH
|
54 |
+
ENV PATH="/root/miniconda/bin:$PATH"
|
55 |
|
56 |
# Copy the current directory contents into the container at /root/app
|
57 |
COPY . /root/app
|
58 |
|
59 |
# Copy rclone configuration
|
60 |
+
# COPY rclone.conf /root/.config/rclone/rclone.conf
|
61 |
|
62 |
RUN chmod +x start_server.sh
|
63 |
|
start_server.sh
CHANGED
@@ -1,19 +1,18 @@
|
|
1 |
#!/bin/bash
|
2 |
-
JUPYTER_TOKEN="${JUPYTER_TOKEN:-$(openssl rand -hex 32)}"
|
3 |
|
4 |
echo "Starting Jupyter Lab with token [REDACTED]"
|
5 |
|
6 |
NOTEBOOK_DIR="/data"
|
7 |
|
8 |
# Mount Google Drive
|
9 |
-
#rclone mount gdrive: /root/GoogleDrive --daemon
|
10 |
|
11 |
-
jupyter-lab \
|
12 |
--ip 0.0.0.0 \
|
13 |
--port 7860 \
|
14 |
--no-browser \
|
15 |
--allow-root \
|
16 |
-
--ServerApp.token="$JUPYTER_TOKEN" \
|
17 |
--ServerApp.tornado_settings="{'headers': {'Content-Security-Policy': 'frame-ancestors *'}}" \
|
18 |
--ServerApp.cookie_options="{'SameSite': 'None', 'Secure': True}" \
|
19 |
--ServerApp.disable_check_xsrf=True \
|
|
|
1 |
#!/bin/bash
|
|
|
2 |
|
3 |
echo "Starting Jupyter Lab with token [REDACTED]"
|
4 |
|
5 |
NOTEBOOK_DIR="/data"
|
6 |
|
7 |
# Mount Google Drive
|
8 |
+
# rclone mount gdrive: /root/GoogleDrive --daemon
|
9 |
|
10 |
+
/root/miniconda/bin/jupyter-lab \
|
11 |
--ip 0.0.0.0 \
|
12 |
--port 7860 \
|
13 |
--no-browser \
|
14 |
--allow-root \
|
15 |
+
--ServerApp.token="${JUPYTER_TOKEN}" \
|
16 |
--ServerApp.tornado_settings="{'headers': {'Content-Security-Policy': 'frame-ancestors *'}}" \
|
17 |
--ServerApp.cookie_options="{'SameSite': 'None', 'Secure': True}" \
|
18 |
--ServerApp.disable_check_xsrf=True \
|