Skip to content

Commit

Permalink
fix: Dockerfile error
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankGTY committed Sep 26, 2024
1 parent d6ecb59 commit 3700091
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions deploy/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
ARG REGISTRY=registry.cn-shanghai.aliyuncs.com/openhydra

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

# 环境变量
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 ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone
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 @@ -26,7 +24,7 @@ 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 install --with lint,test

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

0 comments on commit 3700091

Please sign in to comment.