Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install postgres in Dockerfile for psycopg2 to build correctly #205

Merged
merged 6 commits into from
Feb 16, 2025
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Dockerfile-node
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ RUN apt-get install curl gcc curl git -y

# add conda install to path; use base environment
ENV PATH="/opt/conda/bin:${PATH}"
RUN conda create -n node python=3.12
RUN conda create -y -n node python=3.12
RUN echo "source activate node" > /root/.bashrc
ENV PATH="/opt/conda/envs/node/bin:$PATH"
RUN echo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a typo


# install postgres (required for poetry to build psycopg2 from source)
RUN conda install -y conda-forge::postgresql=17.2
ENV LDFLAGS="-L/opt/conda/lib"
ENV CPPFLAGS="-I/opt/conda/include"

# set up poetry
ENV PATH="/root/.local/share/pypoetry/venv/bin/:${PATH}"
RUN pip install poetry
Expand All @@ -40,4 +45,3 @@ CMD set -x && \
((poetry run celery -A node.worker.main:app worker --loglevel=info | tee /dev/stdout) & ) && \
((poetry run python -m node.server.server --communication-protocol http --port 7001) &) && \
poetry run python -m node.server.server --communication-protocol ws --port 7002

5 changes: 4 additions & 1 deletion Dockerfile-node-dev
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ RUN apt-get install curl gcc curl git -y

# add conda install to path; use base environment
ENV PATH="/opt/conda/bin:${PATH}"
RUN conda create -n node python=3.12
RUN conda create -y -n node python=3.12
RUN echo "source activate node" > /root/.bashrc
ENV PATH="/opt/conda/envs/node/bin:$PATH"
RUN echo

# install postgres (required for poetry to build psycopg2 from source)
RUN conda install -y conda-forge::postgresql=17.2

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like LDFLAGS and CPPFLAGS are missing?

# set up poetry
ENV PATH="/root/.local/share/pypoetry/venv/bin/:${PATH}"
RUN pip install poetry
Expand Down
Loading