-
Notifications
You must be signed in to change notification settings - Fork 6
Windows Installation
There are two ways of installing the milk package on Windows. One way is to use the Windows Subsystem for Linux (WSL) feature, and the other using Windows command prompt (WCP). We do not recommend the WSL installation unless you like to mess around getting the entire ecosystem to work. Windows is less tested than the MAC and Linux environments. If you found a bug report an issue in issues tab of the MILK github.
Note 6/3/2023: There is a dependence issue we are solving for the Mystic/Spotlight tutorials. For now, only the MILK and CINEMA environments are can be installed for Windows.
Install programs
The MILK and CINEMA installations should be cloned through Github Desktop.
After anaconda is installed hit windows key and type "Anaconda Prompt" and open. Navigate to the MILK clone folder on the command line. Type
conda env create -f environment_milk.yml
conda activate milk
Next configure the MAUD and CINEMA paths e.g.:
milk-config C:\Users\dan\Documents\Maud -c C:\Users\dan\Documents\GitHub\cinema_debye_scherrer
After the paths are added, deactivate and activate milk for the environment to be initialized.
Next open Visual studio code (VSC) and install python tools.
The default python interpreter and command prompt need to be set in VSC. ctrl+shift+p triggers the command pallet. Select cmd as the default command prompt and anaconda as the python.
To validate the installation, do tutorial 1 and 3. Navigate to a folder of choice (e.g. C:\Users\dan\Documents\examples) and type in the milk anaconda env
milk-examples -e 1
milk-examples -e 3
Run through the first example with the MAUD GUI before trying to use MILK! In the MAUD GUI configure the compute environment:
The parallel options should be
Make sure to select "Save on disk"
NOTE: The WSL method currently has issues with Cinema visualization.
- To enable WSL, type "Turn Windows Features on or off" in the start menu. Scroll down and check the box for "Windows Subsystem for Linux.
- Search for WSL on Windows Store and install Ubuntu-22.04.2.
- Ubuntu will install then prompt you to create an account. When creating the username, use all lowercases and no special characters like space.
- Update the Ubuntu system by running
sudo apt update
thensudo apt upgrade
.
- Install Anaconda for Linux:
- Navigate to Anaconda downloads and find the Anaconda for Linux version for your computer, most likely the 6"4-Bit (x86) Installer". Copy the link address of the file to download.
- You are most likely in "/home/username/" folder, create a Downloads folder with
mkdir Downloads
- Use command
wget [link]
and replace [link] with the link of the Anaconda installer. This will download the installation script to the folder. Pasting in the WSL command line is mouse right click. - Use command 'bash Anaconda....sh` to install with the downloaded Anaconda script. Type "Ana" then press "tab" to let the terminal auto-complete the name.
- When prompted to restart the shell to let the installed Anaconda take effect, simply use command
source ~/.bashrc
to refresh the shell. Now you will see (base) appearing in front of the username and path handle.
- Install Mambaforge for Linux:
- Navigate to MambaForge site and copy the link address for Mambaforge for Linux, then use
wget
thenbash
, and finallysource
like we did with Anaconda.
- Navigate to MambaForge site and copy the link address for Mambaforge for Linux, then use
- Download MILK, Maud, and Cinema to Workshop folder.
- The purpose of Mambaforge is to fully install MILK. Before that, let's download these packages. Git is by default installed with Ubuntu.
- You are still in "Download" folder, navigate to directory above with
cd ..
then create a Workshop foldermkdir Workshop
. Then go in the folder withcd Workshop
. - Use command
git clone https://github.com/lanl/MILK.git
to download MILK into Workshop. - Use command
git clone https://github.com/cinemascience/cinema_debye_scherrer.git
to download Cinema into Workshop. - To download Maud, navigate to Maud Dropbox Linux and download the zip to anywhere on your computer. Unzip the file and it will make a Maud folder and a _MACOSX folder. You can ignore the MACOSX folder and delete it.
- You won't be able to download the zip file or unzip directly into the Linux directory, but you can find the Ubuntu local files in your file explorer at the bottom of the left side under "Network", then copy the unzipped Maud folder into it:
- Check that you can see MILK, Maud, and Cinema with
ls
. - Navigate into the MILK folder
cd MILK
then use Mamba to install MILK and all the dependencies:mamba env create -f environment_full.yml
- Now you can use conda to activate the "rietveld" environment:
conda activate rietveld
- First, verify that the pip is installed correctly by typing "milk-" then press "tab" for auto-complete. Your terminal should print out all the installed python scripts in MILK:
- Finalize initializing MILK
- Find the path to Maud in the WSL Linux environment by navigating to the Maud folder:
cd ../Maud
. Then usepwd
to print the directory path, copy the path and put in a temporary notepad instance, - Do the same for Cinema path.
- Running
milk-config \path\to\MAUD -c \path\to\Cinema
and replace \path\to\MAUD with the Maud path you copied, and \path\to\Cinema with the Cinema path you copied. - Refresh the conda environment by first deactivate
conda deactivate
then activateconda activate rietveld
. Now you can type$MAUD_PATH
and$CINEMA_PATH
and it should print the paths we entered before.
- Find the path to Maud in the WSL Linux environment by navigating to the Maud folder:
- Finally, download and install Visual Studio code and add the Python and WSL extensions.
- In Visual Studio with WSL extension added and WSL terminal configured, you can click bottom left corner to connect to WSL:
- Now you can create a terminal in Visual Studio code and activate the rietveld environment there. This will be helpful for your own development needs as you can now open the scripts and execute them in the same place.
- To use Cinema, we need to enable WSL to open a browser to display the data. To do so, run the commands below or read for more detail here: https://github.com/wslutilities/wslu
sudo apt update
sudo apt install ubuntu-wsl
sudo add-apt-repository ppa:wslutilities/wslu
sudo apt update
sudo apt install wslu
- Complete WSLU installation by adding the line
export BROWSER=wslview
to your$HOME/.bashrc
:- Type `nano $HOME/.bashrc'
- Use down arrow key to go to the bottom of the file.
- Copy the line
export BROWSER=wslview
- Control + O to save, enter to confirm. Control + X to close.