File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,17 @@ ARG FROM_PYTHON_VERSION
1515RUN python -m pip install --upgrade setuptools pip
1616
1717RUN if [ "$(printf '%s\n' "$FROM_PYTHON_VERSION" "3.11" | sort -V | head -n1)" = "3.11" ]; then \
18- pip install -r requirements-3.11+.txt -c constraints .txt\
18+ mv " requirements-3.11+.txt" "requirements .txt" \
1919 ; else \
20- pip install -r requirements-below-3.11.txt -c constraints .txt\
20+ mv " requirements-below-3.11.txt" "requirements .txt" \
2121 ; fi
2222
23-
24- # Clean up the requirements files from the image
25- RUN rm /requirements-3.11+.txt /requirements-below-3.11.txt
23+ # Install dependencies
24+ # Combine all RUN commands into one to minimize the number of layers
25+ RUN apt-get update \
26+ && apt-get install -y --no-install-recommends gcc \
27+ && pip install --no-cache-dir -r requirements.txt -c constraints.txt \
28+ && apt-get purge -y gcc \
29+ && apt-get autoremove -y \
30+ && apt-get clean \
31+ && rm -rf /var/lib/apt/lists/* /root/.cache
You can’t perform that action at this time.
0 commit comments