diff --git a/Dockerfile b/Dockerfile index a630046..11ab423 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,12 +4,15 @@ WORKDIR /3Dpoints COPY . . -RUN apt update -RUN curl -LsSf https://mirrors.tuna.tsinghua.edu.cn/astral.sh/uv/install.sh | sh +RUN apt update && apt install -y python3-pip + +RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple uv +# 因版本问题,这一个要在最后手动安装,否则构建镜像失败 ENV UV_DEFAULT_INDEX=https://mirrors.aliyun.com/pypi/simple ENV UV_PYTHON_INSTALL_MIRROR=https://registry.npmmirror.com/-/binary/python-build-standalone/ RUN cd /3Dpoints +RUN uv sync ENTRYPOINT ["/3Dpoints/run.sh"] EXPOSE 8081 diff --git a/run.sh b/run.sh index 11811f5..ee7653a 100755 --- a/run.sh +++ b/run.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd /3Dpoints && uv sync && uv run main.py +cd /3Dpoints && source .venv/bin/activate && uv sync && uv run main.py