mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
76 lines
No EOL
2.7 KiB
Docker
76 lines
No EOL
2.7 KiB
Docker
FROM python:3.11.10-bullseye
|
|
|
|
|
|
ARG USER=vscode
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
# 1) Toolchain + utilities for building libpostal
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
sudo jq vim curl git ca-certificates \
|
|
build-essential pkg-config automake autoconf libtool \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# # 2) Build and install libpostal from source
|
|
# RUN git clone --depth 1 https://github.com/openvenues/libpostal /tmp/libpostal \
|
|
# && cd /tmp/libpostal \
|
|
# && ./bootstrap.sh \
|
|
# && ./configure --datadir=/usr/local/share/libpostal \
|
|
# && make -j"$(nproc)" \
|
|
# && make install \
|
|
# && ldconfig \
|
|
# && rm -rf /tmp/libpostal
|
|
|
|
# 3) Create the user and grant sudo privileges
|
|
RUN useradd -m -s /usr/bin/bash ${USER} \
|
|
&& echo "${USER} ALL=(ALL) NOPASSWD: ALL" >/etc/sudoers.d/${USER} \
|
|
&& chmod 0440 /etc/sudoers.d/${USER}
|
|
|
|
# # 4) Python deps - if you want to run assest list
|
|
# ENV PIP_NO_CACHE_DIR=1 PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
# ADD asset_list/requirements.txt requirements.txt
|
|
# RUN pip install -r requirements.txt
|
|
|
|
#
|
|
ENV PIP_NO_CACHE_DIR=1 PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
ADD backend/engine/requirements.txt requirements1.txt
|
|
ADD backend/app/requirements/requirements.txt requirements2.txt
|
|
ADD .devcontainer/backend/requirements.txt requirements3.txt
|
|
ADD etl/hubspot/requirements.txt requirements4.txt
|
|
RUN cat requirements1.txt requirements2.txt requirements3.txt requirements4.txt > requirements.txt
|
|
RUN pip install -r requirements.txt
|
|
|
|
# 5) Workdir
|
|
WORKDIR /workspaces/model
|
|
|
|
# 6) Make Python find your package
|
|
# Add project root to PYTHONPATH for all processes
|
|
ENV PYTHONPATH=/workspaces/model:${PYTHONPATH}
|
|
|
|
|
|
# Install terraform
|
|
RUN apt-get update && sudo apt-get install -y gnupg software-properties-common
|
|
RUN wget -O- https://apt.releases.hashicorp.com/gpg | \
|
|
gpg --dearmor | \
|
|
sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null
|
|
RUN echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \
|
|
https://apt.releases.hashicorp.com $(lsb_release -cs) main" | \
|
|
tee /etc/apt/sources.list.d/hashicorp.list
|
|
RUN apt update
|
|
RUN apt-get install terraform
|
|
RUN terraform -install-autocomplete
|
|
|
|
# Install postgres
|
|
RUN apt install -y wget gnupg2 lsb-release
|
|
RUN echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
|
|
RUN wget -qO - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
|
RUN apt update
|
|
RUN apt install -y postgresql-14
|
|
|
|
# Install Claude
|
|
USER ${USER}
|
|
RUN curl -fsSL https://claude.ai/install.sh | bash \
|
|
&& export PATH="/home/${USER}/.local/bin:${PATH}" \
|
|
&& claude plugin marketplace add JuliusBrussee/caveman \
|
|
&& claude plugin install caveman@caveman
|
|
ENV PATH="/home/vscode/.local/bin:${PATH}"
|
|
USER root |