fix dockerfile

这个提交包含在:
Your Name
2023-03-26 20:18:55 +08:00
父节点 25693c362c
当前提交 74eaff4919
共有 2 个文件被更改,包括 4 次插入6 次删除

查看文件

@@ -1,8 +1,4 @@
FROM ubuntu:latest FROM python:3.11
RUN apt-get update && \
apt-get install -y python3 python3-pip && \
rm -rf /var/lib/apt/lists/*
RUN echo '[global]' > /etc/pip.conf && \ RUN echo '[global]' > /etc/pip.conf && \
echo 'index-url = https://mirrors.aliyun.com/pypi/simple/' >> /etc/pip.conf && \ echo 'index-url = https://mirrors.aliyun.com/pypi/simple/' >> /etc/pip.conf && \

查看文件

@@ -13,9 +13,11 @@ PORT = find_free_port() if WEB_PORT <= 0 else WEB_PORT
initial_prompt = "Serve me as a writing and programming assistant." initial_prompt = "Serve me as a writing and programming assistant."
title_html = """<h1 align="center">ChatGPT 学术优化</h1>""" title_html = """<h1 align="center">ChatGPT 学术优化</h1>"""
# 问询记录,python 版本建议3.9+(越新越好)
import logging import logging
os.makedirs('gpt_log', exist_ok=True) os.makedirs('gpt_log', exist_ok=True)
logging.basicConfig(filename='gpt_log/chat_secrets.log', level=logging.INFO, encoding='utf-8') # python 版本建议3.9+(越新越好) try:logging.basicConfig(filename='gpt_log/chat_secrets.log', level=logging.INFO, encoding='utf-8')
except:logging.basicConfig(filename='gpt_log/chat_secrets.log', level=logging.INFO)
print('所有问询记录将自动保存在本地目录./gpt_log/chat_secrets.log,请注意自我隐私保护哦') print('所有问询记录将自动保存在本地目录./gpt_log/chat_secrets.log,请注意自我隐私保护哦')
# 一些普通功能模块 # 一些普通功能模块