mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-12-24 10:06:43 +02:00
Optimize dockerfile.cuda for dev builds
install large packages before copying repo over to container so that we can use build caches more efficiently.
This commit is contained in:
parent
423b06d0cc
commit
c17832a37c
@ -16,12 +16,12 @@ RUN apt-get update && apt-get upgrade --assume-yes
|
|||||||
|
|
||||||
RUN pip3 install --upgrade pip && apt-get remove python3-pip --assume-yes
|
RUN pip3 install --upgrade pip && apt-get remove python3-pip --assume-yes
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
RUN ln -s /usr/bin/python3 /usr/bin/python
|
RUN ln -s /usr/bin/python3 /usr/bin/python
|
||||||
|
|
||||||
RUN pip3 install torch==1.12.0+cu116 -f https://download.pytorch.org/whl/torch_stable.html
|
RUN pip3 install torch==1.12.0+cu116 -f https://download.pytorch.org/whl/torch_stable.html
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
RUN if [ "$with_models" = "true" ]; then \
|
RUN if [ "$with_models" = "true" ]; then \
|
||||||
# install only the dependencies first
|
# install only the dependencies first
|
||||||
pip3 install -e .; \
|
pip3 install -e .; \
|
||||||
|
Loading…
Reference in New Issue
Block a user