# Roxie Docker project

This repository provides notebooks for the different magnet modelling domains (magnetic, mechanic, ...) to showcase the functionality of the CHART MagNum project and the ROXIE API behind it.

## Getting started

This tutorial assumes you have Docker already installed and running on your machine.
If not please refer to the official docker instructions:

- [Windows: install docker](https://docs.docker.com/desktop/install/windows-install/)
- [Mac: install docker](https://docs.docker.com/desktop/install/mac-install/)

In addition, you need access to the [chart-magnum](https://gitlab.cern.ch/chart-magnum) and [roxie](https://gitlab.cern.ch/roxie) groups on the CERN gitlab instance. If you do not have access already, please request a token from the [roxie-support](mailto://roxie-support@cern.ch) team.

### Cloning the project

To start, clone this project in your working directory:

```bash
git clone https://gitlab.cern.ch/roxie/magnet-repository/roxie-docker-environment.git
```


```bash
cd roxie-docker-environment
```

### Login & Compose & Usage

Now login to the CERN Gitlab registry.

Type:
```bash
docker login registry.cern.ch
```

Now just run the below command and you are ready to go.

```bash
docker-compose up
```

### That's all, Ready  to use

The docker container exposes interfaces to the Jupyter notebooks, and the Roxie interface via Web interfaces:

- [Jupyter notebook](http://127.0.0.1:8888/lab)
- [Roxie GUI](http://localhost:6901/vnc.html?password=roxiepw&autoconnect=true)

# Mount Local Files in the Environment

In order to mount your local files inside the environment, just change the docker-compose.yml correspondingly.

```yml
    volumes:
      - /my/path/to/my/local/file:/home/roxieenv/data

```


### Ansys

In case if the ansys service is needed, read the ansys service, and change the following variable:
- ANSYSLMD_LICENSE_FILE

Compose again the image inside the folder.
