Update dependencies get
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Build BlenderDocker" type="docker-deploy" factoryName="dockerfile" server-name="Docker Default">
|
||||
<configuration default="false" name="Build BlenderDocker" type="docker-deploy" factoryName="dockerfile" server-name="Docker Desktop">
|
||||
<deployment type="dockerfile">
|
||||
<settings>
|
||||
<option name="imageTag" value="stilobique/blender:5.2.0" />
|
||||
|
||||
+5
-5
@@ -20,6 +20,9 @@ RUN git clone --depth 1 --branch v${b3d_vs_major}.${b3d_vs_minor} \
|
||||
https://projects.blender.org/blender/blender.git /opt/blender
|
||||
|
||||
# Get dependencies
|
||||
COPY ./scripts/gen_packages_txt.py /opt/blender/build_files/build_environment/gen_packages_txt.py
|
||||
RUN cd /opt/blender/build_files/build_environment && \
|
||||
python gen_packages_txt.py
|
||||
RUN python /opt/blender/build_files/build_environment/install_linux_packages.py
|
||||
RUN cd /opt/blender && make update
|
||||
RUN cd /opt/blender && make -j$(nproc)
|
||||
@@ -29,11 +32,8 @@ RUN cd /opt/blender && make -j$(nproc)
|
||||
## Setup a Multistage optimisation
|
||||
FROM ubuntu:25.04 AS final
|
||||
|
||||
RUN apt-get update && apt-get install -y python3
|
||||
COPY --from=b3dock /opt/blender/build_files/build_environment/install_linux_packages.py /media/install_linux_packages.py
|
||||
RUN python3 /media/install_linux_packages.py && \
|
||||
rm /media/install_linux_packages.py && \
|
||||
apt --purge remove python3
|
||||
COPY --from=b3dock /opt/blender/build_files/build_environment/packages.txt /tmp/packages.txt
|
||||
RUN apt-get update && xargs -a /tmp/packages.txt apt-get install -y
|
||||
|
||||
RUN useradd -m -s /bin/bash bld
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Lit install_linux_packages.py et génère un fichier .txt avec les paquets
|
||||
Debian/Ubuntu à installer.
|
||||
"""
|
||||
import re
|
||||
import sys
|
||||
|
||||
READER="install_linux_packages.py"
|
||||
OUT="packages.txt"
|
||||
|
||||
|
||||
def main():
|
||||
with open(READER, "r", encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
|
||||
# Cherche toutes les lignes du type: DISTRO_ID_DEBIAN: "nom-du-paquet"
|
||||
packages = re.findall(r'DISTRO_ID_DEBIAN:\s*"([^"]+)"', content)
|
||||
|
||||
# Enlève les doublons, trie
|
||||
packages = sorted(set(packages))
|
||||
|
||||
with open(OUT, "w", encoding="utf-8") as f:
|
||||
for pkg in packages:
|
||||
f.write(pkg + "\n")
|
||||
|
||||
print(f"{len(packages)} paquets écrits dans {OUT}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user