Skip to content

Featuer/dockercompose #26

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Set paths for logs

PATCH_DIR=/media/quantumjot/DataIII/Data/VAE_new/training/patches
GLIMPSE_DIR=/media/quantumjot/DataIII/Data/VAE_new/training/glimpses
MODEL_DIR=/media/quantumjot/DataIII/Models/docker
LOG_DIR=/media/quantumjot/DataIII/Training/cellx-logs
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ celerybeat.pid
*.sage.py

# Environments
.env
.venv
env/
venv/
Expand Down
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,27 @@ This package provides a reference implementation of a tau-VAE. The tau-VAE netwo

The software requires Python 3.7 (or greater), `numpy`, `scipy`, `tqdm`, `Tensorflow`, `scikit-image` and `scikit-learn`. Further, this repo makes extensive use of the [`cellx`](https://github.com/quantumjot/cellx) and [`btrack`](https://github.com/BayesianTracker) libraries. Full requirements can be found in the `requirements.txt` file.

**Install Docker compose**

Installing latest docker-compose

```bash
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
```

### Running in a Docker container

We recommend running this in a docker container.

Build the image:
We recommend running this in a docker container.
We will use docker-compose for this

```sh
```bash
git clone https://github.com/lowe-lab-ucl/cellx-predict.git
cd cellx-predict
docker build . -t cellxpred/cellxpred:latest
env UID=$(id -u) GID=$(id -g) docker-compose up --build
```

You can use the included shell script to run the container and specify the jobs according to the descriptions below.

```sh
./run_docker.sh
```

### Local installation

Expand Down
23 changes: 23 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: '3.8'
services:

cellxpred:
build:
context: .
dockerfile: Dockerfile
user: "${UID}:${GID}"
stdin_open: true
tty: true
command: ["python", "run_training.py", "--model=temporal", "--epochs=100", "--use_probabilistic_encoder"]
volumes:
- ${GLIMPSE_DIR}:/cellx-predict/container/data:ro
- ${LOG_DIR}:/cellx-predict/container/logs:rw
- ${MODEL_DIR}:/cellx-predict/container/models:rw
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia