Conversation
Signed-off-by: Aniket Singh Rawat <sprx@gmail.com>
Signed-off-by: Aniket Singh Rawat <sprx@gmail.com>
|
@dikwickley I'm unable to run the container with Maybe you can look into something like |
|
@VallariAg What if copy |
Signed-off-by: Aniket Singh Rawat <sprx@gmail.com>
0e1e397 to
e80951e
Compare
|
@VallariAg I have made the suggested changes and it works now, the container starts up. Though I suggest we move to a conda-based env. Thoughts on this? |
I'm not sure if that would work (it didn't when I tested that) - you can explore more ways to install dependencies before copying other project content for a pyscaffold packaged python project if you want.
This project is structured using pyscaffold. They added instructions to use conda in https://github.com/ceph/teuthology-api/blob/main/CONTRIBUTING.md#create-an-environment I'm curious to know what prompted this? |
Those instructions are just for creating a blank environment, in which install all dependencies from
I also tried this, and this didn't work out. I compiled requirements.txt using |
| lsb-release && \ | ||
| apt-get clean all | ||
|
|
||
| COPY setup.py . |
There was a problem hiding this comment.
we can just copy requirements.txt and install dependencies with that, I don't think copying setup.py is required
also copying requirements.txt to /teuthology_api would be better, maybe something like:
COPY .teuthology.yaml /root
WORKDIR /teuthology_api
COPY requirements.txt .
RUN pip3 install -r requirements.txt
COPY . /teuthology_api/
RUN pip3 install -e .|
@dikwickley I'm looking at ways to cache pip3 packages like suggested here https://docs.docker.com/build/cache/#use-the-dedicated-run-cache I think this might be a good direction to go from here. |
Moving the pip install command above copying /teuthology_api to take advantage of docker caching.
Fixes: #37
running locally:
@VallariAg can you please review.