调整 Dockerfile 的复制顺序
This commit is contained in:
@@ -24,14 +24,15 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
|
|||||||
/root/.local/bin/uv --version
|
/root/.local/bin/uv --version
|
||||||
ENV PATH="/root/.local/bin:$PATH"
|
ENV PATH="/root/.local/bin:$PATH"
|
||||||
|
|
||||||
# Copy dependency files first for better layer caching
|
# Copy dependency files and source code for building
|
||||||
|
# Note: pixelle_video is needed for hatchling to build the package
|
||||||
COPY pyproject.toml uv.lock README.md ./
|
COPY pyproject.toml uv.lock README.md ./
|
||||||
|
COPY pixelle_video ./pixelle_video
|
||||||
|
|
||||||
# Install Python dependencies using uv
|
# Install Python dependencies using uv
|
||||||
RUN /root/.local/bin/uv sync --frozen --no-dev
|
RUN /root/.local/bin/uv sync --frozen --no-dev
|
||||||
|
|
||||||
# Copy application code
|
# Copy rest of application code
|
||||||
COPY pixelle_video ./pixelle_video
|
|
||||||
COPY api ./api
|
COPY api ./api
|
||||||
COPY web ./web
|
COPY web ./web
|
||||||
COPY bgm ./bgm
|
COPY bgm ./bgm
|
||||||
|
|||||||
Reference in New Issue
Block a user