Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save cceyda/cfd64b36f39fe59d58e6c43227f2ee7b to your computer and use it in GitHub Desktop.

Select an option

Save cceyda/cfd64b36f39fe59d58e6c43227f2ee7b to your computer and use it in GitHub Desktop.

Revisions

  1. cceyda revised this gist Feb 26, 2021. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    pip3 install fastai==1.0.61
    pip3 uninstall --force pillow -y

    # install libjpeg-turbo to $HOME/turbojpeg
    @@ -13,4 +14,7 @@ popd
    CPATH=$HOME/turbojpeg/include LIBRARY_PATH=$HOME/turbojpeg/lib CC="cc -mavx2" pip3 install --upgrade --no-cache-dir --force-reinstall --no-binary :all: --compile pillow-simd

    # add turbojpeg to LD_LIBRARY_PATH
    export LD_LIBRARY_PATH="$HOME/turbojpeg/lib:$LD_LIBRARY_PATH"
    export LD_LIBRARY_PATH="$HOME/turbojpeg/lib:$LD_LIBRARY_PATH"

    # Check success:
    python3 -c "import fastai.utils; fastai.utils.check_perf()"
  2. cceyda revised this gist Feb 26, 2021. No changes.
  3. cceyda revised this gist Feb 26, 2021. 1 changed file with 2 additions and 5 deletions.
    7 changes: 2 additions & 5 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    conda uninstall --force pillow -y
    pip3 uninstall --force pillow -y

    # install libjpeg-turbo to $HOME/turbojpeg
    git clone https://github.com/libjpeg-turbo/libjpeg-turbo
    @@ -10,10 +10,7 @@ make
    make install
    popd

    # install pillow-simd with jpeg-turbo support
    git clone https://github.com/uploadcare/pillow-simd
    pushd pillow-simd
    CPATH=$HOME/turbojpeg/include LIBRARY_PATH=$HOME/turbojpeg/lib CC="cc -mavx2" python setup.py install
    CPATH=$HOME/turbojpeg/include LIBRARY_PATH=$HOME/turbojpeg/lib CC="cc -mavx2" pip3 install --upgrade --no-cache-dir --force-reinstall --no-binary :all: --compile pillow-simd

    # add turbojpeg to LD_LIBRARY_PATH
    export LD_LIBRARY_PATH="$HOME/turbojpeg/lib:$LD_LIBRARY_PATH"
  4. @soumith soumith revised this gist May 10, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    conda uninstall --force jpeg libtiff pillow -y
    conda uninstall --force pillow -y

    # install libjpeg-turbo to $HOME/turbojpeg
    git clone https://github.com/libjpeg-turbo/libjpeg-turbo
  5. @soumith soumith created this gist May 10, 2018.
    19 changes: 19 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    conda uninstall --force jpeg libtiff pillow -y

    # install libjpeg-turbo to $HOME/turbojpeg
    git clone https://github.com/libjpeg-turbo/libjpeg-turbo
    pushd libjpeg-turbo
    mkdir build
    cd build
    cmake .. -DCMAKE_INSTALL_PREFIX:PATH=$HOME/turbojpeg
    make
    make install
    popd

    # install pillow-simd with jpeg-turbo support
    git clone https://github.com/uploadcare/pillow-simd
    pushd pillow-simd
    CPATH=$HOME/turbojpeg/include LIBRARY_PATH=$HOME/turbojpeg/lib CC="cc -mavx2" python setup.py install

    # add turbojpeg to LD_LIBRARY_PATH
    export LD_LIBRARY_PATH="$HOME/turbojpeg/lib:$LD_LIBRARY_PATH"