【问题标题】:Running tensorboard behind traefik在 traefik 后面运行张量板
【发布时间】:2020-12-23 10:26:18
【问题描述】:

我正在尝试将张量板容器添加到在 traefik 后面运行的现有微服务结构中。可惜traefik版本是1.5所以最近很多文章都没有帮助。

由于www.my-server.com/ 上有默认服务,我试图让 traefik 从www.my-server.com/tensorboard/ 重定向到张量板服务。这是我的 docker-compose(与 tensorboard 相关的部分)

  tensorboard:

    build: "./docker/build/images/tensorflow"
    container_name: tensorboard
    command: tensorboard --logdir=runs --port=8888 --host=0.0.0.0
    labels:
      - log.level=debug
      - traefik.enable=true
      - traefik.frontend.rule=Host:www.my-server.com;PathPrefix:/tensorboard/
    volumes:
      - ./machine_learning:/opt/src
    ipc: host

当我访问www.my-server.com/tensorboard/ 时,我得到“未找到”。如果我从命令中删除主机参数,我会得到“坏网关”。我不明白其中任何一个是什么意思,但我认为其中一个能够访问该服务,但该服务正在获取带有前缀 tensorboard 的请求并且正在抱怨。

我该如何进行这项工作?

【问题讨论】:

    标签: tensorboard traefik


    【解决方案1】:

    原来下面的命令可以解决这个问题

    tensorboard --logdir mylogdir --bind_all --path_prefix=/tensorboard

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-04-19
      • 2018-10-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-26
      • 1970-01-01
      相关资源
      最近更新 更多