-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Create container-build.yml #200
base: main
Are you sure you want to change the base?
Conversation
hey @peterdudfield , #197 removes requirements.txt and updates pyproject.toml, due to which the RUN pip install -r requirements.txt line had to be removed from the Dockerfile, but it's still throwing an error at RUN pip install -e . |
was this tested? |
Try on the latest branch on main? Also what is the error? |
|
it works on my local machine, but on docker it can't find quartz_solar_forecast |
Okayy so the issue is that pip install -e . works well in my local machine, but when it tries to build the container from the dockerfile, that same command fails, here's one not so helpful discussion i found https://stackoverflow.com/questions/78044103/pip-install-in-editable-mode-from-a-pyproject-in-a-docker-container-modulenotfo |
|
||
# Install any needed packages specified in requirements.txt | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to copy the pyproject.toml
file over
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to copy the
pyproject.toml
file over
Aren't we copying all the files in the directory anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not currently. In general we try to only copy the files we need.
COPY pyproject.toml .
should do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah see, below we do, but we copy them to app
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah see, below we do, but we copy them to
app
So simply COPY pyproject.toml . Should work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#18 2.100 configuration error: tool.setuptools.packages
must be valid exactly by one definition (0 matches found):
this is the error, it means the packages section of pyproject.toml isnt correctly set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#18 2.100 configuration error:
tool.setuptools.packages
must be valid exactly by one definition (0 matches found):this is the error, it means the packages section of pyproject.toml isnt correctly set
this seems to be the point of failure:
Failed to build numcodecs h5py
220.5 ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (numcodecs, h5py)
seems that h5py requires some additional dependencies , trying that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay i tried to do a workaround here, tried installing h5py which was creating issues with numcodecs as seen in the error logs,
but i see this:
Dockerfile:14
12 |
13 | # Install h5py with no-binary flag
14 | >>> RUN pip install --no-binary h5py h5py
15 |
16 | # Copy the pyproject.toml file
ERROR: failed to solve: process "/bin/sh -c pip install --no-binary h5py h5py" did not complete successfully: exit code: 1
apparently everything fails at the first RUN pip install xyz(whatever dependency), are we missing anything @peterdudfield ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need pip install --no-binary=h5py h5py
, I admit this is a weird problem though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need
pip install --no-binary=h5py h5py
, I admit this is a weird problem though
Not really no, was just trying to see if installing it explicitly fixes the h5py, numcodec issue we see on docker, but rather it led us to another issue that the first pip install whatever always fails
hey @peterdudfield , ive removed all the extra changes like adding the frontend to docker, even then i get the same error and on github i get: |
Hmm, yea, you might have to install conda abd then install it. See uk-pvnet-app for an example - I think |
trying this |
same error :/ ERROR: failed to solve: process "conda run -n myenv /bin/bash -c pip install --no-cache-dir -e ." did not complete successfully: exit code: 1 |
@peterdudfield it just refuses to install .(the current dir): |
Pull Request
Description
github workflow for creating a docker image for the api
Checklist: