diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..41c3faf --- /dev/null +++ b/Dockerfile @@ -0,0 +1,33 @@ +FROM mambaorg/micromamba:jammy-cuda-12.1.1 + +WORKDIR /workspace +USER root + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update --yes --quiet +RUN apt-get install --yes --quiet --no-install-recommends \ + curl ffmpeg git + +RUN sed -i 's/#force_color_prompt/force_color_prompt/g' $HOME/.bashrc +RUN git clone --recurse-submodules --depth 1 https://github.com/chanwutk/.config.git $HOME/.config +RUN echo "source $HOME/.config/rc" >> $HOME/.bashrc +RUN cat <(echo "source $HOME/.config/profile") $HOME/.profile > $HOME/.profile.tmp +RUN mv $HOME/.profile.tmp $HOME/.profile + + +# configre python to output directly to terminal +# see: https://stackoverflow.com/questions/59812009/what-is-the-use-of-pythonunbuffered-in-docker-file +ENV PYTHONUNBUFFERED=1 + +RUN micromamba install --yes --name base python=3.10 poetry=1.7 --channel conda-forge +RUN micromamba clean --all --yes +ARG MAMBA_DOCKERFILE_ACTIVATE=1 + +ENV POETRY_VIRTUALENVS_CREATE=false +# COPY pyproject.toml poetry.lock* ./ +# RUN poetry install --no-root + +# ARG PINECONE_API +# ENV PINECONE_API=$PINECONE_API +ENV PYDEVD_DISABLE_FILE_VALIDATION=1 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f48a824 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,35 @@ +services: + dev: + build: . + container_name: spatialyze + tty: true + environment: + - TERM=xterm-256color + volumes: + - .:/workspace + - /data/apperception-data:/data/apperception-data + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] + ports: + - "8080-8099" + depends_on: + - store + store: + build: + context: . + dockerfile: store.Dockerfile + container_name: spatialyze-gsstore + environment: + - POSTGRES_PASSWORD=postgres + volumes: + - spatialyze-gsstore-data:/var/lib/postgresql + expose: + - 5432 + +volumes: + spatialyze-gsstore-data: \ No newline at end of file diff --git a/store.Dockerfile b/store.Dockerfile new file mode 100644 index 0000000..15f568b --- /dev/null +++ b/store.Dockerfile @@ -0,0 +1,11 @@ +FROM postgis/postgis:16-3.4 + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update --yes --quiet +RUN apt-get install --yes --quiet --no-install-recommends \ + python3 + +RUN rm -rf /pg-extender +COPY ./scripts/pg-extender /pg-extender +RUN cd /pg-extender && python3 install.py \ No newline at end of file