py38 was deprecated a year ago, none of the packages pinned, it is kinda expected that python environment materialization will fail. Base environmetn/image is also deprecated a while back. As a side note, there is not much value of using curated environment image for system managed environment. It will create an isolated environment so preinstalled dependencies won't be available. I you just need to install a few dependencies, like optuna, in the existing environment, just do
FROM mcr.microsoft.com/azureml/curated/acpt-pytorch-1.11-py38-cuda11.3-gpu:9
RUN pip install optuna=={some_compatible_version}