Here is th template I use to run R code in azure ml using azure cli.
I am using following docker file:
FROM rocker/tidyverse:4.0.0-ubuntu18.04
# Install python
RUN apt-get update -qq && \
apt-get install -y python3-pip tcl tk libz-dev libpng-dev
RUN ln -f /usr/bin/python3 /usr/bin/python
RUN ln -f /usr/bin/pip3 /usr/bin/pip
RUN pip install -U pip
# Install python packages
RUN pip install azureml-mlflow
# RUN pip install mlfinlab
# Create link for python
RUN ln -f /usr/bin/python3 /usr/bin/python
# Install additional R packages
RUN R -e "install.packages(c('mlflow'), repos = 'https://cloud.r-project.org/')"
RUN R -e "install.packages(c('carrier'), repos = 'https://cloud.r-project.org/')"
RUN R -e "install.packages(c('optparse'), repos = 'https://cloud.r-project.org/')"
RUN R -e "install.packages(c('tcltk2'), repos = 'https://cloud.r-project.org/')"
RUN R -e "install.packages(c('AzureStor'), repos = 'https://cloud.r-project.org/')"
RUN R -e "install.packages(c('data.table'), repos = 'https://cloud.r-project.org/')"
RUN R -e "install.packages(c('https'), repos = 'https://cloud.r-project.org/')"
RUN R -e "install.packages(c('later'), repos = 'https://cloud.r-project.org/')"
RUN R -e "install.packages(c('reticulate'), repos = 'https://cloud.r-project.org/')"
When I start the computin process (az ml job create -f job.yml --web), I get following error:
...
Successfully installed PyJWT-2.3.0 PySocks-1.7.1 adal-1.2.7 argcomplete-1.12.3 azure-common-1.1.28 azure-core-1.21.1 azure-graphrbac-0.61.1 azure-mgmt-authorization-0.61.0 azure-mgmt-containerregistry-8.2.0 azure-mgmt-core-1.3.0 azure-mgmt-keyvault-9.3.0 azure-mgmt-resource-20.1.0 azure-mgmt-storage-19.0.0 azureml-core-1.38.0 azureml-mlflow-1.38.0 backports.tempfile-1.0 backports.weakref-1.0.post1 bcrypt-3.2.0 certifi-2021.10.8 cffi-1.15.0 charset-normalizer-2.0.11 click-8.0.3 cloudpickle-2.0.0 colorama-0.4.4 contextlib2-21.6.0 cryptography-36.0.1 databricks-cli-0.16.4 docker-5.0.3 entrypoints-0.4 gitdb-4.0.9 gitpython-3.1.18 humanfriendly-10.0 importlib-metadata-4.8.3 isodate-0.6.1 jmespath-0.10.0 jsonpickle-2.1.0 knack-0.8.2 mlflow-skinny-1.23.1 msal-1.16.0 msal-extensions-0.3.1 msrest-0.6.21 msrestazure-0.6.4 ndg-httpsclient-0.5.1 oauthlib-3.2.0 packaging-21.3 paramiko-2.9.2 pathspec-0.9.0 pkginfo-1.8.2 portalocker-2.3.2 protobuf-3.19.4 pyasn1-0.4.8 pycparser-2.21 pygments-2.11.2 pynacl-1.5.0 pyopenssl-21.0.0 pyparsing-3.0.7 python-dateutil-2.8.2 pytz-2021.3 pyyaml-6.0 requests-2.27.1 requests-oauthlib-1.3.1 smmap-5.0.0 tabulate-0.8.9 typing-extensions-4.0.1 urllib3-1.26.7 websocket-client-1.2.3 zipp-3.6.0
�[91mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
�[0mRemoving intermediate container 2d0a80a5caac
---> 56cd74912a75
Step 7/17 : RUN pip install mlfinlab
---> Running in 3b9f5c191996
�[91m/usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
�[0m�[91mERROR: Could not find a version that satisfies the requirement mlfinlab (from versions: none)
ERROR: No matching distribution found for mlfinlab
�[0mThe command '/bin/sh -c pip install mlfinlab' returned a non-zero code: 1
2022/02/11 14:27:58 Container failed during run: acb_step_0. No retries remaining.
failed to run step ID: acb_step_0: exit status 1
Run ID: cb1 failed after 1m51s. Error: failed during run, err: exit status 1
It can't install mlfinlab package.
Is it maybe because of python version? I think mlfinalb works only with python 3.8.
If that is the true, how can I install python 3.8?
Here is th template I use to run R code in azure ml using azure cli.
I am using following docker file:
When I start the computin process (az ml job create -f job.yml --web), I get following error:
It can't install mlfinlab package.
Is it maybe because of python version? I think mlfinalb works only with python 3.8.
If that is the true, how can I install python 3.8?