mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-04-30 19:21:39 +00:00
Move pytorch install above cache bust to prevent reinstalling and reuploading it
This commit is contained in:
@@ -37,6 +37,13 @@ RUN curl -sL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh && \
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Set aliases for python and pip
|
||||||
|
RUN echo 'alias python=python3' >> /etc/bash.bashrc && \
|
||||||
|
echo 'alias pip=pip3' >> /etc/bash.bashrc
|
||||||
|
|
||||||
|
# install pytorch before cache bust to avoid redownloading pytorch
|
||||||
|
RUN pip install --no-cache-dir torch==2.6.0 torchvision==0.21.0 --index-url https://download.pytorch.org/whl/cu126
|
||||||
|
|
||||||
# Fix cache busting by moving CACHEBUST to right before git clone
|
# Fix cache busting by moving CACHEBUST to right before git clone
|
||||||
ARG CACHEBUST=1234
|
ARG CACHEBUST=1234
|
||||||
RUN echo "Cache bust: ${CACHEBUST}" && \
|
RUN echo "Cache bust: ${CACHEBUST}" && \
|
||||||
@@ -46,13 +53,8 @@ RUN echo "Cache bust: ${CACHEBUST}" && \
|
|||||||
|
|
||||||
WORKDIR /app/ai-toolkit
|
WORKDIR /app/ai-toolkit
|
||||||
|
|
||||||
# Set aliases for python and pip
|
|
||||||
RUN echo 'alias python=python3' >> /etc/bash.bashrc && \
|
|
||||||
echo 'alias pip=pip3' >> /etc/bash.bashrc
|
|
||||||
|
|
||||||
# Install Python dependencies
|
# Install Python dependencies
|
||||||
RUN pip install --no-cache-dir torch==2.6.0 torchvision==0.21.0 --index-url https://download.pytorch.org/whl/cu126 && \
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
pip install --no-cache-dir -r requirements.txt
|
|
||||||
|
|
||||||
# Build UI
|
# Build UI
|
||||||
WORKDIR /app/ai-toolkit/ui
|
WORKDIR /app/ai-toolkit/ui
|
||||||
|
|||||||
Reference in New Issue
Block a user