Will my code run on the AI Server?

Hi

I want to use RevoScaleR library but it requires installing Microsoft R Client and then updating the R-studio path to the R client. Is this possible on the AI Server?

Regards

Hello @kamil_singh

TLDR; Can you try adding the following contents to your <path_to_submission_zip>/Dockerfile and make a submission?

FROM 42n4/rstudio-ml

# Create user home directory
ENV USER_NAME aicrowd
ENV HOME_DIR /home/${USER_NAME}

# Replace HOST_UID/HOST_GUID with your user / group id
ENV HOST_UID 1001
ENV HOST_GID 1001

# Use bash as default shell, rather than sh
ENV SHELL /bin/bash

# Set up user
RUN adduser --disabled-password \
    --gecos "Default user" \
    --uid ${HOST_UID} \
    ${USER_NAME}

# Copy submission files to docker image
USER ${USER}
WORKDIR ${HOME_DIR}
COPY --chown=1001:1001 . ${HOME_DIR}

The evaluations happen on a Linux machine. It looks like install.packages('RevoScaleR') won’t work directly in this case. However, if you are comfortable with docker, I think you should be able to get things to work. You can add a Dockerfile in your submission zip file.

In case you are using a custom R interpreter, please make sure you have r command on the image. We trigger the predictions using r predict.R.

Some useful resources:

3 Likes

Thank you for the response @jyotish. I am having issues with the Dockerfile, I added the code you specified into the Dockerfile that you linked in your mail from pwasiewi/dokerz… I’m not familiar with Dockerfile and its not working. Any suggestions?

Hi @kamil_singh, can you provide the submission ID in which you attempted it? We can suggest accordingly.

2 Likes