-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b9e6ce
commit 4720782
Showing
15 changed files
with
49 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"nbformat":4,"nbformat_minor":0,"metadata":{"kernelspec":{"name":"julia-1.6","display_name":"Julia 1.6.3"},"accelerator":"GPU","colab":{"name":"JuliaOnColab.ipynb","provenance":[],"collapsed_sections":[]}},"cells":[{"cell_type":"markdown","metadata":{"id":"Q7S9cpFJqfXy","colab_type":"text"},"source":["## Julia on Colaboratory ##\n","\n","[Colaboratory](https://colab.research.google.com) does not provide native support for the [Julia programming language](https://julialang.org). However, since Colaboratory gives you root access to the machine that runs your notebook (the *“runtime”* in Colaboratory terminology), we can install Julia support by uploading a specially crafted Julia notebook – *this* notebook. We then install Julia and [IJulia](https://github.com/JuliaLang/IJulia.jl) ([Jupyter](https://jupyter.org)/Colaboratory notebook support) and reload the notebook so that Colaboratory detects and initiates what we installed.\n","\n","In brief:\n","\n","1. **Run the cell below**\n","2. **Reload the page**\n","3. **Edit the notebook name and start hacking Julia code below**\n","\n","**If your runtime resets**, either manually or if left idle for some time, **repeat steps 1 and 2**.\n","\n","### Acknowledgements ###\n","\n","This hack by Pontus Stenetorp is an adaptation of [James Bradbury’s original Colaboratory Julia hack](https://discourse.julialang.org/t/julia-on-google-colab-free-gpu-accelerated-shareable-notebooks/15319/27), that broke some time in September 2019 as Colaboratory increased their level of notebook runtime isolation. There also appears to be CUDA compilation support installed by default for each notebook runtime type in October 2019, which shaves off a good 15 minutes or so from the original hack’s installation time. Adapted for Knet by Deniz Yuret."]},{"cell_type":"code","metadata":{"id":"BrHjOFFsxf7W","colab_type":"code","colab":{}},"source":["# Julia/IJulia installation cell: run once (takes 3 minutes) and reload page before running the next cell\n","%%shell\n","if ! command -v julia 2>&1 > /dev/null\n","then\n"," wget 'https://julialang-s3.julialang.org/bin/linux/x64/1.6/julia-1.6.3-linux-x86_64.tar.gz' -O /tmp/julia.tar.gz\n"," tar -x -f /tmp/julia.tar.gz -C /usr/local --strip-components 1\n"," rm /tmp/julia.tar.gz\n","fi\n","julia -e 'using Pkg; Pkg.add(\"IJulia\"); using IJulia'"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"bkBZp_6YP4gf","colab_type":"code","colab":{},"executionInfo":{"status":"ok","timestamp":1597766746070,"user_tz":-180,"elapsed":15743,"user":{"displayName":"Deniz Yuret","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14Gj8W-IzSgNCFTMidV62_Jk1D71JEmwu-mlVQG6vzA=s64","userId":"08088404300358457303"}}},"source":["# CUDA/Knet initialization cell: run after reloading page\n","ENV[\"JULIA_CUDA_USE_BINARYBUILDER\"]=\"false\" # Use this for faster installation, otherwise CUDA libraries will be downloaded\n","Pkg.add(\"Knet\"); using Knet"],"execution_count":1,"outputs":[]},{"cell_type":"code","metadata":{"id":"pWDXteAbeUmz","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":85},"executionInfo":{"status":"ok","timestamp":1597766770605,"user_tz":-180,"elapsed":3982,"user":{"displayName":"Deniz Yuret","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14Gj8W-IzSgNCFTMidV62_Jk1D71JEmwu-mlVQG6vzA=s64","userId":"08088404300358457303"}},"outputId":"abcf4e28-e2c3-4a1e-83ba-384f314f698c"},"source":["# Test if Knet is working\n","a = KnetArray(randn(3,4))\n","sigm.(a)"],"execution_count":2,"outputs":[{"output_type":"execute_result","data":{"text/plain":["3×4 KnetArray{Float64,2}:\n"," 0.166717 0.736478 0.554168 0.679858\n"," 0.159598 0.189955 0.206203 0.719744\n"," 0.814341 0.480435 0.757772 0.338862"]},"metadata":{"tags":[]},"execution_count":2}]},{"cell_type":"code","metadata":{"id":"aio4RbwRRyiK","colab_type":"code","colab":{}},"source":[""],"execution_count":null,"outputs":[]}]} | ||
{"nbformat":4,"nbformat_minor":0,"metadata":{"kernelspec":{"name":"julia-1.6","display_name":"Julia 1.6"},"accelerator":"GPU","colab":{"name":"JuliaOnColab.ipynb","provenance":[],"collapsed_sections":[]}},"cells":[{"cell_type":"markdown","metadata":{"id":"Q7S9cpFJqfXy"},"source":["## Julia on Colaboratory ##\n","\n","[Colaboratory](https://colab.research.google.com) does not provide native support for the [Julia programming language](https://julialang.org). However, since Colaboratory gives you root access to the machine that runs your notebook (the *“runtime”* in Colaboratory terminology), we can install Julia support by uploading a specially crafted Julia notebook – *this* notebook. We then install Julia and [IJulia](https://github.com/JuliaLang/IJulia.jl) ([Jupyter](https://jupyter.org)/Colaboratory notebook support) and reload the notebook so that Colaboratory detects and initiates what we installed.\n","\n","In brief:\n","\n","1. **Run the cell below**\n","2. **Reload the page**\n","3. **Edit the notebook name and start hacking Julia code below**\n","\n","**If your runtime resets**, either manually or if left idle for some time, **repeat steps 1 and 2**.\n","\n","### Acknowledgements ###\n","\n","This hack by Pontus Stenetorp is an adaptation of [James Bradbury’s original Colaboratory Julia hack](https://discourse.julialang.org/t/julia-on-google-colab-free-gpu-accelerated-shareable-notebooks/15319/27), that broke some time in September 2019 as Colaboratory increased their level of notebook runtime isolation. There also appears to be CUDA compilation support installed by default for each notebook runtime type in October 2019, which shaves off a good 15 minutes or so from the original hack’s installation time. Adapted for Knet by Deniz Yuret."]},{"cell_type":"code","metadata":{"id":"BrHjOFFsxf7W"},"source":["# Julia/IJulia installation cell: run once (takes 30 seconds) and reload page before running the next cell\n","%%shell\n","wget 'https://julialang-s3.julialang.org/bin/linux/x64/1.6/julia-1.6.3-linux-x86_64.tar.gz' -O /tmp/julia.tar.gz\n","tar -x -f /tmp/julia.tar.gz -C /usr/local --strip-components 1\n","rm /tmp/julia.tar.gz\n","julia -e 'using Pkg; Pkg.add(\"IJulia\")'"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"bkBZp_6YP4gf"},"source":["# Knet installation cell: run after reloading/renaming notebook\n","ENV[\"JULIA_CUDA_USE_BINARYBUILDER\"]=\"false\" # Use this for faster installation, otherwise CUDA libraries will be downloaded\n","using Pkg; Pkg.add(\"Knet\")"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"pWDXteAbeUmz"},"source":["# All should be ready, you can start typing Julia code or cutting and pasting cells from another notebook"],"execution_count":null,"outputs":[]}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4720782
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
4720782
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/46714
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: