You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Welcome to the Earth Analytics Environment Repository! Here you will find a conda envt that can be installed on your computer using a ``.yml` file. You will also find a docker image that can be used to actually run the environment in a containerized environment.
2
+
Welcome to the Earth Analytics Environment Repository! Here you will find a conda envt that can be installed on your computer using a `.yaml` file. You will also find a docker image that can be used to actually run the environment in a containerized environment.
We recommend installing geo-related dependencies with `conda-forge`. We
19
28
have created a custom yaml list with all of the dependencies that you will
20
29
need to run the lessons in this course. Follow
21
30
these steps below to get your environment ready.
22
31
23
32
About Conda Environments: https://conda.io/docs/user-guide/tasks/manage-environments.html
24
33
25
-
An environment for conda has been created specifically for this course. To load this run:
34
+
An environment for conda has been created specifically for this course. To load it, run:
26
35
27
36
`conda env create -f environment.yml`
28
37
29
38
* Note that it takes a bit of time to run this setup
30
-
* Also note that for the code above to work, you need to be in the directory where the `environment.yml` file lives.
39
+
* Also note that for the code above to work, you need to be in the directory where the `environment.yml` file lives (ex: cd earth-analytics-python-env).
40
+
41
+
To update this environment from a yaml file use:
42
+
`conda env update -f environment.yml`
31
43
32
44
To manage your conda environments, use the following commands:
33
45
@@ -36,17 +48,27 @@ To manage your conda environments, use the following commands:
36
48
37
49
#### Activate the environment that you'd like to use
38
50
39
-
`source activate myenv-name`
51
+
On Mac or Linux:
40
52
41
-
In our case, the environment that we are using is called: `earth-analytics-python`. This name is
42
-
defined in the `environment.yml` file. Thus you'd type:
53
+
```
54
+
source activate earth-analytics-python
55
+
```
43
56
44
-
`source activate earth-analytics-python`
57
+
On Windows:
58
+
59
+
```
60
+
activate earth-analytics-python
61
+
```
45
62
46
-
to activate it once it's installed.
63
+
The environment name is `earth-analytics-python` as
docker run -it -p 8888:8888 earthlab/earth-analytics-python-env
61
83
62
84
```
63
85
64
86
3. Run the image.
65
87
66
-
To run your earth-analytics image you use the following code:
88
+
To run your earth-analytics image, use the following code:
67
89
68
-
`docker run -it -p 8888:8888 earthlab/earth-analytics`
90
+
`docker run --hostname localhost -it -p 8888:8888 earthlab/earth-analytics-python-env`
69
91
70
-
NOTE: `earthlab/earth-analytics` is the name of this image as built above. To
71
-
view all images on your computer type
72
-
`docker images -all`
92
+
NOTE: `earthlab/earth-analytics-python-env` is the name of this image as built above. To
93
+
view all images on your computer, type
94
+
`docker images --all`
73
95
74
96
One you run your image, you will be given a URL at the command line. Paste that puppy
75
97
into your browser to run jupyter with the earth analytics environment installed!!
98
+
99
+
## Updating the Earth Analytics Environment
100
+
101
+
If you wish to update the earth analytics environment, do the following.
102
+
103
+
1. make a **PR** with changes to master
104
+
2.**think** about your changes - don't do silly things or break things :)
105
+
3.**merge** the PR into the master branch
106
+
4. Check & wait till [Dockerhub](https://hub.docker.com/r/earthlab/earth-analytics-python-env/tags/) has built the image for the merging of the **PR** you can see builds in progress, [here](https://hub.docker.com/r/earthlab/earth-analytics-python-env/builds/)
107
+
5. Finally, once the build is complete you can then you can update hub-ops repo with the newly tagged image.
108
+
109
+
## Important Notes
110
+
If the update the `earthpy` package, you must specify the commit number that you
111
+
wish to build `earthpy` against. This will ensure that the docker image
112
+
automagically rebuilds using the latest version of `earthpy`
113
+
114
+
like this: `- git+https://github.com/earthlab/earthpy.git@283683affac9e46b1690c7913ebd2621c82ba43a`
115
+
116
+
This PR should kick off a rebuild of the docker image. But that docker image will
117
+
not be usable until it's built off of the master branch.
118
+
119
+
NOTE 2: The DockerHub build actually takes forever and ever. So it's best to check out the build status rather than assuming it's built.
0 commit comments