[Azure DSVM] GPU not usable in pre-installed python kernels and file permission(read-only) problems in jupyterhub environment

TJ J 11 Reputation points
2021-05-21T04:36:35.493+00:00

I got two questions.

Steps to reproduce Q1:

  1. create a "Data Science Virtual Machine- Ubuntu 18.04" resource, area US northcentral, authentication by password, other options setting to default.
  2. After the VM was created, enter https://VMIP:8000 and login.
  3. create a file testGPU.ipynb
  4. switch to different kernels and test GPU availability and see results below:
    98481-image.png
    98482-image.png
    98483-image.png
    98472-image.png
  5. in command line, run python, and then run the same codes above, it indicated that GPU is available. (e.g. Num GPUs: 1)
  6. in command line, run conda activate py38_tensorflow, then python, and run codes above, it indicated that GPU is available. (e.g. Num GPUs: 1)

Problems Q1: GPU not usable in pre-installed python kernels in jupyterhub environment
Expect: GPU is available in tensorflow in jupyterhub.

Steps to reproduce Q2:

  1. create an azure storage account and create an azure file share resource
  2. put some files in the Azure file share space(e.g. test.txt)
  3. mount an Azure file share drive by the command recommended in Azure portal, but add arguments gid=100(assign usergroup=users to all mounted files)
  4. add a user USERID to a group by sudo usermod -a -G users USERID
  5. create a symbolic link by ln -s /mnt/mounted_file_share ~/notebooks/fileshare
  6. reboot the machine
  7. sudo chmod 777 test.txt
  8. vi test.txt and it does not say it is read-only.
  9. open test.txt in jupyterhub and try to edit and save but finding out that save failed.
  10. vi test.txt again and find out it is readonly now. r-xr-xr-x 1 root users 5981 May 21 04:22 test.txt

Problems Q2: file permissions are always read-only in jupyterhub environment for those files not created by jupyterhub.

Azure Data Science Virtual Machines
Azure Data Science Virtual Machines
Azure Virtual Machine images that are pre-installed, configured, and tested with several commonly used tools for data analytics, machine learning, and artificial intelligence training.
69 questions
{count} votes

2 answers

Sort by: Most helpful
  1. timoklimmer 11 Reputation points
    2021-05-27T19:54:01.247+00:00

    The GPU problem can be fixed by installing TensorFlow 2.5.0 which came out just recently. To fix, run !pip install --upgrade tensorflow-gpu in a Jupyter cell and restart the kernel. We will fix this in the next releases, either next week or end of June/beginning of August. I haven't had the time to look into Q2 but will do as well and come back again.

    @TJ J fyi

    1 person found this answer helpful.
    0 comments No comments

  2. timoklimmer 11 Reputation points
    2021-05-31T14:32:57.107+00:00

    I have taken a look at the second issue meanwhile. When you run the command from Azure Portal, there is no need to add something like gid=100 or add the new user to the users group. The script mounts the file share with 777 permissions already. I tried and could write to the same file with two different users.

    @TJ J fyi

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.