TL;DR
** With GitPod, you can use both IDE and jupyter on your iPad, so it's great! ** **
GitPod
has the following features.
GitHub
On iPad chrome Build a Python programming environment (IDE and jupyterlab). The general procedure is as follows.
Place the following three files in a suitable repository. The first file is the docker file used on GitPod.
.gitpod.Dockerfile
FROM python:3.7
RUN apt update -y && apt upgrade -y
RUN pip install pipenv
The second file is the GitPod
configuration file.
The reason for opening port 8888 is to use jupyterlab
.
.gitpod.yml
image:
file: .gitpod.Dockerfile
ports:
- port: 8080
onOpen: open-preview
- port: 8888
onOpen: open-browser
The third file is Pipfile
.
This is not required because it is a file prepared assuming that you are building a virtual environment with pipenv
. (If you use pipenv, you can use the local environment as it is on GitPod, so it is recommended.) I think it would be nice if the package had jupyterlab
and pandas
.
Pipfile
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
pandas = "*"
jupyterlab = "*"
matplotlib = "*"
[requires]
python_version = "3.7"
So far, I think the following 3 files (and README.md) are located directly under the repository.
github_repository
(Repository root)
|-.gitpod.Dockerfile
|-.gitpod.yml
|-Pipfile
|-README.md
GitPodへのアクセスはGitHubリポジトリのURLにgitpod.io/#
を付与するだけです。
For example, if the URL of your GitHub repository is:
https://github.com/[user_name]/[repository_name]
The URL to access the GitPod
is:
https://gitpod.io/#github.com/[user_name]/[repository_name]
It's hard to type every time, so it's convenient to put a link in README.md on GitHub.
The GitPod IDE takes about 10 minutes to start the first time, but it takes 1 to 2 minutes after the second time.
Since there is Pipfile
in the repository, you can start jupyterlab just by hitting the following command.
$ pipenv install
$ pipenv shell
([repository_name])$ jupyter lab
Launch the pipenv shell,
You can also start and log in to jupyterlab on your iPad.
If you are using GitPod on your iPad, you will see a long bar at the bottom of the screen with prediction candidates. (Black bar in two colors at the bottom of the image)
This disappears when you turn off "Input Assistance" in "Settings"-> "General / Keyboard" on the iPad.
There are more and more things you can do with your iPad, so Nowadays, I think the iPad is really enough for simple programming. (By the way, this article is also written on the iPad.)
Recommended Posts