Canmet's development environment
5.8K
This image, is based upon the NREL's nrel/openstudio docker container. It contains a consistent development environment that runs the latests versions of OpenStudio and E+.This also allows NRCan staff to write helper scripts based on this environment. This environment will allow you to do a few things, create all the NECB archetype, run analysis on OS server cluster, generate geometery from eQuest files, add archetypes to our development and other things.
mkdir /c/Users/$(whoami)/projects && cd /c/Users/$(whoami)/projects
git clone https://github.com/canmet-energy/btap-development-environment.git && cd btap-development-environment
This will erase ALL of your previous containers and download a freash new copy of the BTAP-DE. Careful this will erase all your previous images and containers and start fresh. It will not delete anything in your regular windows folders.
cd /c/Users/$(whoami)/projects/btap-development-environment && ./1_rm_images_and_containers.sh
This will create the Docker Image used for development. This may take a long time to pull. At BCC this may take up to 4 hours, so you may wish to use the alternative for CanmetEnergy Staff. Be patient as this will take a long time.
cd /c/Users/$(whoami)/projects/btap-development-environment && ./2-dockerfile_pull_image.sh
BCC has very slow internet speed. To speed up very long download times, a version of the phylroy/btap-development-environment will be kept on the network drive. The above is the preferred method, but this is faster, but may not be always up to date. This should take 10-15 minutes.
cd /c/Users/$(whoami)/projects/btap-development-environment && ./2-dockerfile_canmet_fast_build_image.sh
This will create a container that you can do development in. You can create many containers based on the image that we created above. We will call this container my_workspace
cd /c/Users/$(whoami)/projects/btap-development-environment && ./3-dockerfile_create_container.sh my_workspace
You can now just start your container by your container name, in this case it is my_workspace
cd /c/Users/$(whoami)/projects/btap-development-environment && ./4-dockerfile_start_container.sh my_workspace
After you start the container, your bash prompt should change to reflect that you are 'in' the container. To start a nice x terminal, type:
terminator
This will start the terminator terminal. This is your X terminal called 'terminator this where you can execute linux commands. There are numerous tutorials on the linux console that we will not go into here.
The container was set up to be linked to your C:\Users<your windows username> folder on windows. If you perform a directory listing "ls -l" and hit enter you should see a listing of files and folders. One of these folders is called 'windows-host' this is your shared folder to windows. If you ls that directory, you should see your host windows user folders. The neat thing is that you can interact with that folder like it was a mounted drive. You cannot access your full windows systems the way the container is currently implemented.
OpenStudio is installed in the image, and the default ruby implemenation is linked to OpenStudio as well, so you can run ruby scripts easiy. You may also run OpenStudio by typing the following at the command prompt. The OpenStudio version is the release version.
OpenStudioApp &
You can run the openstudio cli by running
openstudio
energyplus
The R language is also installed with some common NREL plugings used for buildings.
Node JS is installed and npm.
Originally I added Netbeans and VSCode to the image. This took too much effort to maintain and made the image large.
Nano, Vim and XEmacs have been installed by default. If you wish to install other editors.
To checkout copies of development and make things a bit easier (in your ~/.gitconfig file) os = clone https://github.com/NREL/OpenStudio.git os-standards = clone https://github.com/NREL/openstudio-standards.git os-ptool =clone https://github.com/NREL/OpenStudio-PTool.git os-measures = clone https://github.com/NREL/OpenStudio-measures.git os-spreadsheet = https://github.com/NREL/OpenStudio-analysis-spreadsheet.git nrcan-ptool = clone https://github.com/phylroy/OpenStudio-PTool.git nrcan-standards = clone https://github.com/NREL/openstudio-standards.git -b nrcan nrcan-measures = clone https://github.com/NREL/OpenStudio-measures.git -b nrcan So to clone the nrcan-standards branch, you simply type.
git nrcan-standards
#Troubleshooting
This can be due to network conflicts. This has been observed on Docker for Windows v1.12.3. One solution found was to change the mtu value to something lower in the docker host container. You can add this by opening the Docker setting from the tray icon, going to the Docker Deamon tab and add the MTU value like below
{
"registry-mirrors": [],
"insecure-registries": [],
"debug": false,
"mtu": 1400
}
The best way to deal with this is to delete the default docker machine and create a new one with the correct size. This procudure will delete all your images and containers..so back up anything that you need! This will create a 100GB disk. This procudure works only for Docker Toolbox and in the QuickStart Terminal.
docker-machine rm default
docker-machine create --driver virtualbox --virtualbox-disk-size "100000" default
docker-machine env default
Content type
Image
Digest
Size
1.2 GB
Last updated
almost 8 years ago
docker pull canmet/btap-development-environment