FROM python:3.11 | |
WORKDIR /code | |
COPY ./requirements.txt /code/requirements.txt | |
RUN python3 -m pip install --no-cache-dir --upgrade pip | |
RUN python3 -m pip install --no-cache-dir --upgrade -r requirements.txt | |
COPY . . | |
CMD ["python", "/code/app.py", "--address", "0.0.0.0", "--port", "7860", "--allow-websocket-origin", "*"] | |
# RUN mkdir /.cache | |
# RUN chmod 777 /.cache | |
# RUN mkdir .chroma | |
# RUN chmod 777 .chroma | |
# # Use the official Ubuntu image. | |
# Use the official Ubuntu image. | |
# Use the official Ubuntu image. | |
# Use the official Ubuntu image. | |
# Use the official Ubuntu image. | |
# Use the official Ubuntu image. | |
# Use the official Ubuntu image. | |
# 使用官方 Ubuntu 镜像 | |
# 使用官方 Ubuntu 镜像 | |
# 使用基础镜像 | |
# 使用基础镜像 | |
# FROM qiudeng/drissionpage4-ubuntu-webdesktop-novnc:latest | |
# # 设置工作目录 | |
# WORKDIR /app | |
# # 创建必要的目录并设置权限 | |
# RUN mkdir -p /etc/supervisor/conf.d /var/log/supervisor && \ | |
# chmod -R 755 /etc/supervisor/conf.d /var/log/supervisor && \ | |
# touch /var/log/supervisor/supervisord.log && \ | |
# chmod 666 /var/log/supervisor/supervisord.log | |
# 暴露 VNC 和 noVNC 端口 | |
# EXPOSE 5000 | |
# 启动 VNC 服务器和 noVNC | |
# CMD ["sh", "/startup.sh"] | |