# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker | |
# you will also find guides on how best to write your Dockerfile | |
FROM ubuntu:20.04 | |
RUN apt-get update | |
RUN apt-get install -y python3 python3-pip | |
ENV OPENAI_API_KEY=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 | |
ENV CODE=123456 | |
WORKDIR /usr/src/app | |
# (可选)暴露所需端口,如果基础镜像已经暴露了所需端口,则这一步不是必需的 | |
EXPOSE 3000 | |
# RUN docker run -d -p 3000:3000 \ | |
# -e OPENAI_API_KEY=sk-xxxx \ | |
# -e CODE=页面访问密码 \ | |
# yidadaa/chatgpt-next-web | |
# WORKDIR /code | |
# COPY ./requirements.txt /code/requirements.txt | |
# RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
COPY . . | |
CMD ["python", "./main.py"] |