Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

feat: create Dockerfile for shipping codegate as image #113

Merged
merged 1 commit into from
Nov 28, 2024
Merged

Conversation

yrobla
Copy link
Contributor

@yrobla yrobla commented Nov 28, 2024

Create a makefile to build the image, and Dockerfile to specify the build steps. Modify README to give instructions to run the codegate image

Closes: #62

@yrobla yrobla marked this pull request as draft November 28, 2024 10:09
Create a makefile to build the image, and Dockerfile to specify
the build steps. Modify README to give instructions to run the
codegate image

Closes: #62
@yrobla yrobla marked this pull request as ready for review November 28, 2024 11:48
Comment on lines +22 to +30
# Copy only the files needed for installing dependencies
COPY pyproject.toml poetry.lock* /app/

# Configure Poetry and install dependencies
RUN poetry config virtualenvs.create false && \
poetry install --no-dev

# Copy the rest of the application
COPY . /app
Copy link
Contributor

@aponcedeleonch aponcedeleonch Nov 28, 2024

Choose a reason for hiding this comment

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

I'm not a 100% sure. But I think that if we copy the complete application into the app directory and then run poetry install --no-dev it should install codegate module. In other words, doing

COPY . /app

# Configure Poetry and install dependencies
RUN poetry config virtualenvs.create false && \
    poetry install --no-dev

Would already enable us to do

from codegate. # import whatever submodule

This has the benefit that we would avoid changing the PYTHONPATH further down the file

# Set the PYTHONPATH environment variable
ENV PYTHONPATH=/app/src

It's just a nit I noticed. I think as it is it should do the trick

Copy link
Contributor

@aponcedeleonch aponcedeleonch left a comment

Choose a reason for hiding this comment

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

Approved with one comment

@yrobla yrobla merged commit f005ecc into main Nov 28, 2024
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build and Publish Image containing VectorDB
3 participants