File size: 742 Bytes
41bd99a
 
330b7b0
 
 
 
 
41bd99a
 
 
 
 
 
d31770d
41bd99a
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

JUPYTER_TOKEN="${JUPYTER_TOKEN:=huggingface}"

# Đổi về thư mục app để thấy file code 
 
jupyter labextension disable "@jupyterlab/apputils-extension:announcements"
# 1. Chạy Jupyter Lab ở port 8888 (nội bộ), disable xsrf và config giống gợi ý của bạn
jupyter-lab \
    --ip 0.0.0.0 \
    --port 8888 \
    --no-browser \
    --allow-root \
    --ServerApp.token="$JUPYTER_TOKEN" \
    --ServerApp.disable_check_xsrf=True \
    --ServerApp.tornado_settings="{'headers': {'Content-Security-Policy': 'frame-ancestors *'}}" \
    --ServerApp.cookie_options="{'SameSite': 'None', 'Secure': True}" &

# 2. Chạy Nginx ở port 7860 (cổng công cộng)
nginx -c /home/user/nginx.conf -g 'daemon off;'