SenseVoice icon indicating copy to clipboard operation
SenseVoice copied to clipboard

使用Dockerfile构建的镜像无法正常访问

Open IAMJOYBO opened this issue 8 months ago • 3 comments

Notice: In order to resolve issues more efficiently, please raise issue following the template. (注意:为了更加高效率解决您遇到的问题,请按照模板提问,补充细节)

🐛 Bug

Image

Image

To Reproduce

FROM pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime
ENV DEBIAN_FRONTEND=noninteractive
EXPOSE 50000
ENV TZ=Asia/Shanghai

RUN mkdir -p /app
WORKDIR /app
RUN apt update && apt install -y wget curl net-tools tree git git-lfs 

RUN git clone https://github.com/FunAudioLLM/SenseVoice.git
WORKDIR /app/SenseVoice
RUN pip install -r requirements.txt

RUN rm -rf /var/lib/apt/lists/*

CMD ["python", "webui.py"]
services:
  sensevoice:
    image: registry.cn-hangzhou.aliyuncs.com/joybo/sensevoice
    container_name: sensevoice
    hostname: sensevoice
    environment:
      - TZ=Asia/Shanghai
      - HF_HOME=/app/sensevoice/models
      - MODELSCOPE_CACHE=/app/sensevoice/models
      - GRADIO_SERVER_NAME=0.0.0.0
      - GRADIO_SERVER_PORT=7860
      - share=True
      # - NVIDIA_VISIBLE_DEVICES=0
    volumes:
      - ./:/app/sensevoice
    ports:
      - "8000:8000"
    runtime: nvidia
    deploy:
      resources:
        reservations:
          devices:
          - driver: nvidia
            # device_ids: ['0']
            capabilities: [gpu]
    stdin_open: true
    tty: true
    restart: no
    networks:
      - sensevoice
    entrypoint: ["python", "webui.py", "--listen"]

networks:
  sensevoice:
    driver: bridge
    name: sensevoice

Code sample

https://github.com/IAMJOYBO/sensevoice

Expected behavior

Environment

FROM pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime
ENV DEBIAN_FRONTEND=noninteractive
EXPOSE 50000
ENV TZ=Asia/Shanghai

RUN mkdir -p /app
WORKDIR /app
RUN apt update && apt install -y wget curl net-tools tree git git-lfs 

RUN git clone https://github.com/FunAudioLLM/SenseVoice.git
WORKDIR /app/SenseVoice
RUN pip install -r requirements.txt

RUN rm -rf /var/lib/apt/lists/*

CMD ["python", "webui.py"]

Additional context

IAMJOYBO avatar Apr 12 '25 17:04 IAMJOYBO

试下启动指令更换为

GRADIO_SERVER_NAME=0.0.0.0 nohup python webui.py > webui.log 2>&1 &

HelloPengZH avatar Apr 18 '25 06:04 HelloPengZH

试下启动指令更换为

GRADIO_SERVER_NAME=0.0.0.0 nohup python webui.py > webui.log 2>&1 &

Docker Compose 指定环境变量不可以吗?

Image

IAMJOYBO avatar Apr 21 '25 00:04 IAMJOYBO

官方提供一个镜像?

SamYuan1990 avatar Jun 20 '25 10:06 SamYuan1990