有没有人找到让 Tensorboard 受密码保护的方法?
Has anybody found a way to make Tensorboard password-protected?
我一直在努力让Tensoboard password-protected, but it isn't easy as it is not a Flask app. An issue去年开通了,但是一直没有消息。
不幸的是,由于 Tensorboard 没有内置密码保护,我在 docker 容器中使用了一个 nginx 服务器作为反向代理。
Tensorboard 然后受到 HTTP 基本身份验证的保护。
nginx.conf
events { worker_connections 1024; }
http {
server {
listen 5000;
server_name localhost;
location / {
proxy_pass http://host.docker.internal:5000;
auth_basic "Restricted Remote";
auth_basic_user_file /etc/nginx/.htpasswd;
}
}
}
要生成 .htpasswd 文件,请使用以下命令:
htpasswd -c .htpasswd admin
docker-compose.yml
version: '3'
services:
nginx:
image: nginx:latest
container_name: nginx_reverse_proxy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./.htpasswd:/etc/nginx/.htpasswd
ports:
- 5000:5000
至 运行 使用 docker-compose up -d
我写了一篇博客 post,其中我解释了如何在 GCP cost-effective 方式。此 post 包括 Terraform 设置,以便可以轻松复制解决方案。
https://blog.ml6.eu/a-vertex-ai-tensorboard-alternative-for-smaller-budgets-part-2-923953c1e422
我一直在努力让Tensoboard password-protected, but it isn't easy as it is not a Flask app. An issue去年开通了,但是一直没有消息。
不幸的是,由于 Tensorboard 没有内置密码保护,我在 docker 容器中使用了一个 nginx 服务器作为反向代理。
Tensorboard 然后受到 HTTP 基本身份验证的保护。
nginx.conf
events { worker_connections 1024; }
http {
server {
listen 5000;
server_name localhost;
location / {
proxy_pass http://host.docker.internal:5000;
auth_basic "Restricted Remote";
auth_basic_user_file /etc/nginx/.htpasswd;
}
}
}
要生成 .htpasswd 文件,请使用以下命令:
htpasswd -c .htpasswd admin
docker-compose.yml
version: '3'
services:
nginx:
image: nginx:latest
container_name: nginx_reverse_proxy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./.htpasswd:/etc/nginx/.htpasswd
ports:
- 5000:5000
至 运行 使用 docker-compose up -d
我写了一篇博客 post,其中我解释了如何在 GCP cost-effective 方式。此 post 包括 Terraform 设置,以便可以轻松复制解决方案。
https://blog.ml6.eu/a-vertex-ai-tensorboard-alternative-for-smaller-budgets-part-2-923953c1e422