Skip to content

Commit

Permalink
feat: update Dockerfile
Browse files Browse the repository at this point in the history
fix: Dockerfile error

fix: Dockerfile

fix: Dockerfile

fix: Dockerfile

fix: Dockerfile
  • Loading branch information
FrankGTY committed Sep 26, 2024
1 parent 6ba1be6 commit 4c2b0a4
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions deploy/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
ARG REGISTRY=registry.cn-shanghai.aliyuncs.com/openhydra

FROM ${REGISTRY}/python:3.11
FROM python:3.11
WORKDIR /root

# 环境变量
Expand All @@ -9,7 +7,7 @@ ENV AITUTOR_ROOT=/root/aitutor_data
# 初始化环境
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone
RUN --mount=type=cache,target=/var/cache/apt apt-get update -y && \
RUN apt-get update -y && \
apt-get install -y git vim && \
apt-get install -y --no-install-recommends libgl1 libglib2.0-0 && \
apt-get clean && \
Expand All @@ -25,11 +23,10 @@ COPY ./libs /root/aes-ai-tutor/libs

# 安装依赖
WORKDIR /root/aes-ai-tutor/libs
RUN poetry config virtualenvs.create false
RUN --mount=type=cache,target=/root/.cache/pip poetry install --with lint,test
RUN poetry config virtualenvs.create false && \
poetry lock --no-update
RUN poetry install --with lint,test

## 确保 Python 可以找到 aitutor 模块
ENV PYTHONPATH="/root/aes-ai-tutor/libs/aitutor:${PYTHONPATH}"

# 初始化配置
WORKDIR /root/aes-ai-tutor/libs/aitutor
Expand Down

0 comments on commit 4c2b0a4

Please sign in to comment.