imchatroom / Dockerfile
zhzabcd's picture
Update Dockerfile
ab258d3 verified
raw
history blame contribute delete
504 Bytes
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 /code/requirements.txt
COPY . .
# 创建缓存目录
RUN mkdir /.cache
RUN chmod 777 /.cache
# 创建 chroma 目录
RUN mkdir .chroma
RUN chmod 777 .chroma
# 设定 Flask 运行环境
ENV FLASK_ENV=production
# 开放端口
EXPOSE 5000
# 设置容器运行时执行的命令
CMD ["python3", "/code/app.py"]