Skip to content

Commit

Permalink
Merge pull request bmaltais#706 from chiragjn/patch-1
Browse files Browse the repository at this point in the history
Add `--no-cache-dir` to reduce image size
  • Loading branch information
bmaltais authored May 3, 2023
2 parents fa41e40 + eb2ca44 commit 959ef18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ RUN python3 -m venv ./venv && . ./venv/bin/activate && \
# Install requirements
COPY requirements.txt setup.py .
RUN . ./venv/bin/activate && \
python3 -m pip install --use-pep517 -U -r requirements.txt
python3 -m pip install --no-cache-dir --use-pep517 -U -r requirements.txt

# Upgrade to Torch 2.0
RUN . ./venv/bin/activate && \
python3 -m pip install --use-pep517 --no-deps -U triton==2.0.0 torch>=2.0.0+cu121 xformers==0.0.17 \
python3 -m pip install --no-cache-dir --use-pep517 --no-deps -U triton==2.0.0 torch>=2.0.0+cu121 xformers==0.0.17 \
--extra-index-url https://download.pytorch.org/whl/cu121

# Fix missing libnvinfer7
Expand All @@ -37,4 +37,4 @@ RUN sed -i 's/import library.huggingface_util/# import library.huggingface_util/

STOPSIGNAL SIGINT
ENV LD_PRELOAD=libtcmalloc.so
CMD . ./venv/bin/activate && python3 "./kohya_gui.py" ${CLI_ARGS} --listen 0.0.0.0 --server_port 7860
CMD . ./venv/bin/activate && python3 "./kohya_gui.py" ${CLI_ARGS} --listen 0.0.0.0 --server_port 7860

0 comments on commit 959ef18

Please sign in to comment.