Skip to content

Commit

Permalink
docker
Browse files Browse the repository at this point in the history
  • Loading branch information
chanwutk committed Feb 25, 2024
1 parent 68d4f88 commit 02855f6
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
35 changes: 35 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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:
11 changes: 11 additions & 0 deletions store.Dockerfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 02855f6

Please sign in to comment.