Search This Blog


How to setup Fast.AI on QNAP NAS TS-2888X

How to setup Fast.AI on QNAP NAS
Fast.AI website: 

online courses (all are free and have no ads):

           software: fastai v1 for PyTorch

          We are testing Fast.AI on QNAP NAS
          docker image from dockerhub :
          Tag : 1.0-release

          before we start, if you are new to QNAP NAS, suggest read these tutorial, including how to setup GPU and other development tool.

          after successful install the Fast.AI docker image, we testing: example/dogs_cats.ipynb

          find three issues ... and now we will explain how to modify it to complete the example

          • RuntimeError: DataLoader worker (pid 13) is killed by signal: Bus error.
          • CUDA Out of Memory Error
          • ModuleNotFoundError

          RuntimeError: DataLoader worker (pid 13) is killed by signal: Bus error.


          solution 1 : increase shm-size

          1. Command : GPU=nvidia0 gpu-docker run --name=Fastai --shm-size=16G -d -p 8888:8888 paperspace/fastai:1.0-release
            (shm-size depends on the real memory size, suggest only using half memory for shm)
          2. Open Container Station, and get into Fastai Container
          3. from the screen you can see the token, just copy token and then click the URL ex :
          4. using token to login Jupyter notebook

          solution 2:
          1. using Container Station create docker image
          2. modify Python code, add "num_workers=1" into DataLoader

          issue2 : CUDA Out of Memory Error

          reference :

          solution: modify batch size

          1. modify Python code ,add "bs=16" into DataLoader

          issue3: ModuleNotFound

          solution: add module

          1. get into Jupyter notebook
          2. open Terminal

          3. pip install
            ex. : pip install dataclasses
          4. if package dependency issue, install accordingly

          5. after install, restart notebook cell

          once you fixed these issue, you can run sample example/dogs_cats.ipynb successfully

          No comments:

          Post a Comment

          Related Posts Plugin for WordPress, Blogger...