-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from nimh-dsst/docker-speedup
use a base image for docker
- Loading branch information
Showing
10 changed files
with
72 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.terraform | ||
*/.terraform | ||
tempdata/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Ignore the virtual environment directory | ||
_version.py | ||
dashboard_data | ||
node_modules | ||
venv/ | ||
*coverage* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM tiangolo/uvicorn-gunicorn:python3.11 | ||
|
||
WORKDIR /app | ||
RUN mkdir -p /opt/data | ||
RUN mkdir -p /opt/osm | ||
|
||
RUN pip install poetry fastapi[standard] uvicorn | ||
# Install requirements first in a separate layer to avoid re-installing them on | ||
# every code changes | ||
COPY pyproject.toml /opt/osm | ||
RUN bash -c 'FORCE_OSM_VERSION=0.0.0 pip install -r <(poetry export --without-hashes --format=requirements.txt)' | ||
# Install the package | ||
COPY osm /opt/osm/osm | ||
RUN --mount=source=.git,target=/opt/osm/.git,type=bind pip install --no-dependencies -e /opt/osm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM nimhdsst/osm_base | ||
RUN pip install llama-index llama-index-llms-openai llama-index-program-openai | ||
|
||
# # Copy the project files and install the package | ||
COPY external_components/llm_extraction/app.py /app | ||
|
||
CMD ["fastapi", "dev", "--host", "0.0.0.0", "--port", "8072"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,5 @@ | ||
FROM tiangolo/uvicorn-gunicorn:python3.11 | ||
FROM nimhdsst/osm_base | ||
|
||
WORKDIR /app | ||
RUN pip install fastapi[standard] | ||
# Consider installing from pypi | ||
RUN mkdir -p /opt/osm | ||
COPY pyproject.toml /opt/osm | ||
COPY osm /opt/osm/osm | ||
ARG PSEUDO_VERSION=0.0.1 # strongly recommended to update based on git describe | ||
RUN SETUPTOOLS_SCM_PRETEND_VERSION_FOR_OSM=${PSEUDO_VERSION} pip install -e /opt/osm | ||
RUN --mount=source=.git,target=/opt/osm/.git,type=bind pip install -e /opt/osm | ||
COPY ./web/api/main.py /app/app/main.py | ||
|
||
CMD ["fastapi", "run", "--host", "0.0.0.0", "--port", "80", "--root-path", "/api"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,12 @@ | ||
FROM tiangolo/uvicorn-gunicorn:python3.11 | ||
|
||
WORKDIR /app | ||
|
||
|
||
# Create the environment | ||
RUN pip install panel pymongo odmantic pandas pydantic[email] pyarrow | ||
|
||
RUN mkdir -p /opt/data | ||
ENV LOCAL_DATA_PATH=/opt/data/matches.parquet | ||
COPY ./tempdata/matches.parquet /opt/data/matches.parquet | ||
|
||
RUN mkdir -p /opt/osm | ||
COPY pyproject.toml /opt/osm | ||
COPY osm /opt/osm/osm | ||
ARG PSEUDO_VERSION=0.0.1 # strongly recommended to update based on git describe | ||
RUN SETUPTOOLS_SCM_PRETEND_VERSION_FOR_OSM=${PSEUDO_VERSION} pip install -e /opt/osm | ||
RUN --mount=source=.git,target=/opt/osm/.git,type=bind pip install -e /opt/osm | ||
|
||
FROM nimhdsst/osm_base | ||
RUN pip install colorcet panel | ||
# # Copy the project files and install the package | ||
COPY web/dashboard/ /app | ||
CMD ["python", "app.py"] | ||
|
||
|
||
# # Create the environment | ||
# RUN pip install panel pymongo odmantic pandas pydantic[email] pyarrow | ||
|
||
# ENV LOCAL_DATA_PATH=/opt/data/matches.parquet | ||
# COPY ./tempdata/matches.parquet /opt/data/matches.parquet |