Spaces:
Runtime error
Runtime error
FROM python:3.11 | |
RUN apt update | |
RUN apt install -y git fontconfig | |
RUN git clone https://github.com/binary-husky/gpt_academic.git | |
WORKDIR gpt_academic | |
RUN pip install -r requirements.txt | |
RUN pip install torch | |
# 设置环境变量 | |
ENV ADD_WAIFU=True | |
ENV LLM_MODEL="gpt-3.5-turbo" | |
ENV AVAIL_LLM_MODELS='["gpt-3.5-turbo", "gpt-4"]' | |
ENV DARK_MODE=False | |
ENV WEB_PORT=7860 | |
ENV MPLCONFIGDIR=/tmp/matplotlib | |
ENV TRANSFORMERS_CACHE=/tmp/transformers | |
ENV FONTCONFIG_PATH=/etc/fonts | |
# 创建这些目录并给予写权限 | |
RUN mkdir -p $MPLCONFIGDIR $TRANSFORMERS_CACHE $FONTCONFIG_PATH/fonts/cache gpt_log && \ | |
chmod -R a+rw $MPLCONFIGDIR $TRANSFORMERS_CACHE $FONTCONFIG_PATH/fonts/cache gpt_log | |
EXPOSE 7860 | |
CMD ["python", "main.py", "--host", "0.0.0.0:7860"] | |