From 181882e47880ab757522183508a3a64092bbea93 Mon Sep 17 00:00:00 2001 From: Manuel Lera Ramirez Date: Tue, 31 Oct 2023 17:34:05 +0000 Subject: [PATCH] docker image working --- .github/workflows/ci.yaml | 2 +- Dockerfile | 15 ++++++--------- docker_start.sh | 2 ++ dummy.py | 1 - ...ocal_depency.sh => install_local_dependency.sh | 0 readme.md | 6 ++---- 6 files changed, 11 insertions(+), 15 deletions(-) create mode 100644 docker_start.sh delete mode 100644 dummy.py rename install_local_depency.sh => install_local_dependency.sh (100%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 03dbdc4..8a37682 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,7 +21,7 @@ jobs: - name: Install dependencies run: | poetry install --no-dev - sh install_local_depency.sh + sh install_local_dependency.sh # Before running the test you have to download the tags! - name: Run tests run: | diff --git a/Dockerfile b/Dockerfile index 13f643b..49e72f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,15 +2,12 @@ FROM python:3.9 WORKDIR /pipeline -RUN pip install poetry -RUN pip install nltk -RUN pip install toml - -COPY ./ /pipeline/ - +RUN pip install poetry RUN poetry config virtualenvs.create false -RUN poetry install --without dev -RUN poetry shell -COPY . /pipeline +COPY ./ /pipeline + +RUN poetry install --no-dev +RUN sh install_local_dependency.sh +CMD ["sh", "docker_start.sh"] diff --git a/docker_start.sh b/docker_start.sh new file mode 100644 index 0000000..0a19999 --- /dev/null +++ b/docker_start.sh @@ -0,0 +1,2 @@ +python get_data/get_fpbase_data.py allele_components/tags_fpbase.toml +uvicorn api:app --host 0.0.0.0 --port 80 diff --git a/dummy.py b/dummy.py deleted file mode 100644 index b9f4f2a..0000000 --- a/dummy.py +++ /dev/null @@ -1 +0,0 @@ -from genestorian_module.build_nltk_tags import build_nltk_tag diff --git a/install_local_depency.sh b/install_local_dependency.sh similarity index 100% rename from install_local_depency.sh rename to install_local_dependency.sh diff --git a/readme.md b/readme.md index 2f7b1a3..5bf0c82 100644 --- a/readme.md +++ b/readme.md @@ -50,12 +50,10 @@ poetry run python -m ipykernel install --user To build from the dockerfile available in the repo: ``` -$ docker build -t genestorian . -$ docker run --name genestorian_c -d genestorian:latest sleep inifinity -$ docker exec -it genestorian_c /bin/sh +docker build -t genestorian_data_refinement . +docker run -d --name genestorian_data_refinement_container -p 8000:80 genestorian_data_refinement ``` -To stop the docker: `$ docker stop genestorian_c` ## Getting the data