Dockerfile for Bake config

This commit is contained in:
lutzapps 2024-11-01 05:32:03 +07:00
parent d3b15d6b83
commit 776f1c9d03

View file

@ -1,7 +1,7 @@
# Use the specified base image # lutzapps - use the specified CUDA version
ARG BASE_IMAGE
# lutzapps - use uppercase "AS" FROM ${BASE_IMAGE:-madiator2011/better-base:cuda12.4} AS base
FROM madiator2011/better-base:cuda12.4 AS base #FROM madiator2011/better-base:cuda12.4 AS base
# lutzapps - prepare for local developement and debugging # lutzapps - prepare for local developement and debugging
# needed to change the ORDER of "apt-get commands" and move the "update-alternatives" for python3 # needed to change the ORDER of "apt-get commands" and move the "update-alternatives" for python3
@ -10,8 +10,10 @@
# Install Python 3.11, set it as default, and remove Python 3.10 # Install Python 3.11, set it as default, and remove Python 3.10
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y python3.11 python3.11-venv python3.11-dev python3.11-distutils aria2 git \ # removed: 2x git nginx ffmpeg (as they are already installed with the base image)
pv git rsync zstd libtcmalloc-minimal4 bc nginx ffmpeg && \ # added: zip (for easier folder compression)
apt-get install -y python3.11 python3.11-venv python3.11-dev python3.11-distutils aria2 zip \
pv rsync zstd libtcmalloc-minimal4 bc && \
apt-get remove -y python3.10 python3.10-minimal libpython3.10-minimal libpython3.10-stdlib && \ apt-get remove -y python3.10 python3.10-minimal libpython3.10-minimal libpython3.10-stdlib && \
update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 && \ update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 && \
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 && \ update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 && \
@ -63,9 +65,6 @@ EXPOSE 7222
# lutzapps - added a "app/tests" folder with script and testdata and readme file # lutzapps - added a "app/tests" folder with script and testdata and readme file
# lutzapps - grouped NGINX files in a sub-folder for cleaner view # lutzapps - grouped NGINX files in a sub-folder for cleaner view
# Copy the README.md
COPY nginx/README.md /usr/share/nginx/html/README.md
# NGINX configuration # NGINX configuration
COPY nginx/nginx.conf /etc/nginx/nginx.conf COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/readme.html /usr/share/nginx/html/readme.html COPY nginx/readme.html /usr/share/nginx/html/readme.html