diff --git a/backend/base/Dockerfile b/backend/base/Dockerfile
index ab03e7ee626214f80035896e1444a3e7593c8eae..abac32d6007fd0d5798e01e26757f7b70f354ed0 100644
--- a/backend/base/Dockerfile
+++ b/backend/base/Dockerfile
@@ -47,8 +47,6 @@ RUN apt-get update && \
 		libwebp-dev \
 		libxrender-dev \
 		pkg-config \ 
-		python3-dev \
-		python3-pip \
 		rustc \ 
 		libtinfo5 \
 		swig \
@@ -56,9 +54,9 @@ RUN apt-get update && \
     apt-get clean && \
     rm -rf /var/lib/apt/lists/*
     
-RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then pip3 install torch torchvision -f https://torch.kmtea.eu/whl/stable.html; else pip3 install torch torchvision; fi
+RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then pip3 install --no-cache-dir torch torchvision -f https://torch.kmtea.eu/whl/stable.html; else pip3 install --no-cache-dir torch torchvision; fi
 
-RUN pip3 install pyvips==2.1.15 cmake==3.21.2
+RUN pip3 install --no-cache-dir pyvips==2.1.15 cmake==3.21.2
 
 #Build and install libraw
 WORKDIR /tmp/builds