Skip to content

Commit

Permalink
Support ubuntu 23.04+ in cm docker
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh committed Feb 9, 2024
1 parent 12e0afa commit 5720193
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cm-mlops/script/build-dockerfile/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ def preprocess(i):
f.write('RUN '+ get_value(env, config, 'package-manager-get-cmd') + " " + " ".join(get_value(env, config,
'packages')) + EOL)

if env['CM_DOCKER_OS'] == "ubuntu":
if int(env['CM_DOCKER_OS_VERSION'].split('.')[0]) >= 23:
if "--break-system-packages" not in env.get('CM_DOCKER_PIP_INSTALL_EXTRA_FLAGS', ''):
env['CM_DOCKER_PIP_INSTALL_EXTRA_FLAGS'] = " --break-system-packages"
pip_extra_flags = env.get('CM_DOCKER_PIP_INSTALL_EXTRA_FLAGS', '')

f.write(EOL+'# Install python packages' + EOL)
Expand Down

0 comments on commit 5720193

Please sign in to comment.