Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed Docker Builds #1168

Merged
merged 4 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 0 additions & 95 deletions .dockerignore

This file was deleted.

86 changes: 0 additions & 86 deletions .github/workflows/docker.yml

This file was deleted.

6 changes: 1 addition & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
name: Build Wheels and upload to PyPI
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI

on:
pull_request:
branches: ["releases/**"]
types: [labeled, opened, synchronize, reopened]
release:
types: [published]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
53 changes: 0 additions & 53 deletions Dockerfile

This file was deleted.

31 changes: 2 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ This will automatically open your browser with a link to our Jupyter notebooks.

Be sure to keep this terminal open. **Do not exit the terminal or enter `control-c` until you are finished with the notebooks**.

You can shut down the notebooks and close docker by entering `control-c` in the terminal window.
You can shut down the notebooks by entering `control-c` in the terminal window.

**REMEMBER TO DUPLICATE AND RENAME NOTEBOOKS**

Expand Down Expand Up @@ -251,27 +251,6 @@ the cell expression of that marker when you mouse over the cell in Mantis.

![](docs/_images/mantis_feature_view.png)

### External Hard Drives and Google File Stream

To configure external hard drive (or google file stream) access, you will have to add this to Dockers file paths in the Preferences menu.

On Docker for macOS, this can be found in Preferences -> Resources -> File Sharing. Adding `/Volumes` will allow docker to see external drives

On Docker for Windows with the WSL2 backend, no paths need to be added. However, if using the Hyper-V backend, these paths will need to be added as in the macOS case.

![](docs/_images/docker_preferences.png)

Once the path is added, you can run:
```
bash start_docker.sh --external 'path/added/to/preferences'
```
or
```
bash start_docker.sh -e 'path/added/to/preferences'
```

to mount the drive into the virtual `/data/external` path inside the docker.

## Updating the Repository

This project is still under development, and we are making frequent changes and improvements. If you want to update the version on your computer to have the latest changes, perform the following steps. Otherwise, we recommend waiting for new releases.
Expand All @@ -283,13 +262,7 @@ git pull
```

Then, run the command below to update the Jupyter notebooks to the latest version
```sh
./start_docker.sh --update
```
or
```sh
./start_docker.sh -u
```


If you have made changes to these notebooks that you would like to keep (specific file paths, settings, custom routines, etc), rename them before updating!

Expand Down
4 changes: 0 additions & 4 deletions docs/_rtd/data_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ If you are using your own spatial analysis tools to generate information for the
* `PRE_CHANNEL_COL`: Set this to be the column name which precedes first channel column.
* `POST_CHANNEL_COL`: Set this to be the column name which comes after the last channel column.

Afterwards the Docker Image can be started with the updated settings.
```sh
start_docker.sh
```

---

Expand Down
39 changes: 1 addition & 38 deletions docs/_rtd/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,48 +57,11 @@ To verify installation, activate your `conda` environment with `conda activate <

You're now set to start working with `ark-analysis`! Please look at [our contributing guidelines](contributing.html) for more information about development. For detailed explanations of the functions available to you in `ark`, please consult the Libraries section of this documentation.

### Updating Ark Analysis in the Docker

**Note** that code changes aren't automatically propagated into the Docker Image.
However there may be times where you would like to work with and test out new changes and features.

You may update the current version of `ark-analysis` by running the following commands
in the Jupyter Lab terminal.

```sh
cd /opt/ark-analysis
git pull
pip install .
```

#### Using ark functions directly
### Using ark functions directly

If you will only be using functions in `ark` without developing on top of it, do not clone the repo. Simply run `pip install ark-analysis` inside the virtual environment to gain access to our functions. To verify installation, type `conda list ark-analysis` after completion. If `ark-analysis` is listed, the installation was successful. You can now access the `ark` library with `import ark`.

### Developing template notebooks via Docker

If you are using docker for your virtual environment, and plan to develop and commit template notebooks, then you should use the `--develop-notebook-templates` flag for `start_docker.sh`.

Typically, the `./templates` folder is copied into `./scripts` before starting docker and Jupyter is started within `./scripts`. This enables users of `ark-analysis` to use the notebooks without dirtying the git working directory—doing so would cause merge conflicts on pull. When using `--develop-notebook-templates`, `./templates` is used directly, so changes are changes reflected directly.

To enable, pass the either `-d` or `--develop-notebook-templates` to `start_docker.sh`

$ ./start_docker -d

Now notebooks can be `git diff`ed and `git commit`ed without having to copy changed notedbooks between `./scripts` and `./templates`.

### Building Docker Images Locally

It may be useful to be able to manually build a new Docker Image as features get added, changes made and libraries updated.
Specifically, updating Python libraries requires building a new docker image from scratch.


Once you are in `ark-analysis`, the Docker Image can be built with the following command.
```
docker build -t ark-analysis .
```

The docker image will now build, and this process can take some time.

### More on xarrays

Expand Down
15 changes: 3 additions & 12 deletions docs/_rtd/faq.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
## FAQ

### When I run the notebook, it says "No module named 'ark'"

This error generally happens if you run the notebook outside of Docker. Simply running `jupyter notebook` or `jupyter lab` on a notebook will not start Docker for you. You need to explicitly run `bash start_docker.sh` and follow the prompts in our [README](https://github.com/angelolab/ark-analysis/blob/main/README.md).

If you continue to run into issues, make sure you don't have any other Docker sessions running.

srivarra marked this conversation as resolved.
Show resolved Hide resolved
This could be an issue with the `ark_env` Conda environment. Make sure that `ark_env` is activated before opening `jupyter lab`. You can also try to reinstall the package with `pip install ark-analysis`.
### I got an error when running the notebook

The functions in `ark` have a lot of error checking built in. This means that if any of the arguments are wrong, you will get a ValueError of some kind. There's a good chance that the error message will tell you in very direct terms what the problem is, so please carefully read the error message.

For example, if you get an invalid path error, the error message indicate which part of the path doesn't exist, helping you to troubleshoot.

If you're still stuck, please completely close the notebook, kill the docker, and restart everything. If you've exhausted all of these options and are still getting the same error, feel free to open an [issue](https://github.com/angelolab/ark-analysis/issues/new/choose).
If you're still stuck, please completely close the notebook, and restart everything. If you've exhausted all of these options and are still getting the same error, feel free to open an [issue](https://github.com/angelolab/ark-analysis/issues/new/choose).

### My kernel keeps dying

This means Docker is running out of memory. To increase the memory, open Docker Preferences (on Mac, click the whale logo with boxes on the top menu bar, and select Preferences). Select Resources on the left panel, and a slider will appear for Docker memory usage which you can use to increase.

Keep in mind that you should be careful increasing your Docker memory usage above half of your computer RAM. For example, if you have a 16 GB computer, we recommend not increasing your Docker memory above 8 GB.

Avoid adjusting the CPUs, Swap, and Disk Image Size sliders.
This could be caused by many things. The most common reason may be memory related, please submit an issue.

### How can I help improve this project?

Expand Down
Loading
Loading