Skip to content

Commit

Permalink
Merge pull request #1161 from cfe-lab/update-devcontainer
Browse files Browse the repository at this point in the history
Update devcontainer
  • Loading branch information
Donaim authored Oct 21, 2024
2 parents ba5929b + cb96090 commit 55f77c2
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 53 deletions.
7 changes: 0 additions & 7 deletions .devcontainer/Dockerfile

This file was deleted.

6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

// More info: https://containers.dev/guide/dockerfile
"build": {
"dockerfile": "Dockerfile"
"dockerfile": "../Dockerfile"
},

// Features to add to the dev container. More info: https://containers.dev/features.
Expand All @@ -14,8 +14,8 @@
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "python -m pip install .[dev]",
// Use 'onCreateCommand' to run commands after the container is created, but before anything else starts.
"onCreateCommand": "python -m pip install .[dev,test]",

// Configure tool-specific properties.
"customizations": {
Expand Down
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
.idea
bin
docs
*cache*
.github
Dockerfile
micall/tests/working
micall/tests/microtest/scratch
micall/tests/microtest/micall-results
Expand All @@ -12,4 +15,4 @@ venv_micall
*/*.pyc
*/*/*.pyc
*/*/*/*.pyc
simgs
simgs
11 changes: 11 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@ jobs:
python -m pip install codecov
codecov
docker-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build docker image
run: docker build --tag micall --file Dockerfile .
- name: Run docker image entrypoint
run: docker run micall --help
- name: Check docker image entrypoint
run: docker run micall --help | grep -i -e 'docker'

singularity-test:
runs-on: ubuntu-20.04
steps:
Expand Down
28 changes: 7 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,28 +86,14 @@ RUN apt-get install -q -y zlib1g-dev libncurses5-dev libncursesw5-dev && \
## Install dependencies for genetracks/drawsvg
RUN apt-get install -q -y libcairo2-dev

COPY pyproject.toml /opt/micall/
COPY . /opt/micall/

## Python packages, plus trigger matplotlib to build its font cache
WORKDIR /opt
RUN pip install --upgrade pip && \
pip install .[basespace] && \
python -c 'import matplotlib; matplotlib.use("Agg"); import matplotlib.pyplot'
RUN pip install --upgrade pip
RUN pip install /opt/micall[basespace]
RUN micall make_blast_db

## MiCall
COPY micall_docker.py micall_kive.py micall_kive_resistance.py version.tx[t] /opt/micall/
COPY micall/__init__.py micall/project* /opt/micall/micall/

COPY micall/blast_db/make_blast_db.py /opt/micall/micall/blast_db/make_blast_db.py
COPY micall/core /opt/micall/micall/core/
COPY micall/data /opt/micall/micall/data/
COPY micall/drivers /opt/micall/micall/drivers/
COPY micall/g2p /opt/micall/micall/g2p/
COPY micall/resistance /opt/micall/micall/resistance/
COPY micall/monitor /opt/micall/micall/monitor/
COPY micall/utils /opt/micall/micall/utils/

RUN python /opt/micall/micall/blast_db/make_blast_db.py
## Trigger matplotlib to build its font cache
RUN python -c 'import matplotlib; matplotlib.use("Agg"); import matplotlib.pyplot'

WORKDIR /data
ENTRYPOINT ["python", "/opt/micall/micall_docker.py"]
ENTRYPOINT ["micall", "micall_docker"]
21 changes: 0 additions & 21 deletions dev.dockerfile

This file was deleted.

0 comments on commit 55f77c2

Please sign in to comment.