tensorflow - 有人找到了使 Tensorboard 受密码保护的方法吗?

标签 tensorflow authentication passwords password-protection tensorboard

我一直在尝试制作 Tensoboard受密码保护,但这并不容易,因为它不是 Flask 应用程序。安 issue去年开张了,但一直没有消息。

最佳答案

不幸的是,由于 Tensorboard 没有内置密码保护,我在 docker 容器中使用了一个 nginx 服务器作为反向代理。

然后使用 HTTP 基本身份验证保护 Tensorboard。

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

关于tensorflow - 有人找到了使 Tensorboard 受密码保护的方法吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51693983/

相关文章:

ios - 使用 FBSessionLoginBehaviorForcingWebView 登录 Facebook

java - 在 gnupg-for-java 中提供 GnuPG key 的密码

ios - 阻止 UITextField 安全文本清除现有文本

python - 类型错误 : Input 'y' of 'Mul' Op has type float32 that does not match type float64 of argument 'x'

python - ValueError : Tensor conversion requested dtype int32 for Tensor with dtype float32 while using tf. 图像.crop_to_bounding_box

tensorflow - 在 Jupyter 中可视化 TensorFlow 图的简单方法?

tensorflow - 具有归一化二元交叉熵损失的模型不收敛

java - 无需 protected 资源的 JSF/Java EE 登录

authentication - Blazor Wasm with AAD B2C : SignUpSignIn userflow - reset password, 如何捕获 AADB2C90118

c# - 使用散列密码验证用户的流程?