lightly-ai / lightly-ai/lightly-train
Export PYTHOPATH inside docker container
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 116
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 6
Description
### 💡 Is your feature request related to a problem?
I am using your amazing lightly-train package inside your proposed docker container (0.11.0) since the proposed docker usage kind of restrics flexibility (for me):
1. starting a container and
2. using it via CLI
Problem: The python package from conda is used at the moment instead of the copied source. This results in an error because of a missing config file:
FileNotFoundError: [Errno 2] No such file or directory: '/opt/conda/lib/python3.11/site-packages/lightly_train/_models/dinov2_vit/dinov2_vit_src/configs/ssl_default_config.yaml'
### 🧰 Describe the solution you'd like
Adding the PYTHONPATH in your Dockerfile should fix it. It works for me when I build an image like that:
```
FROM lightly/train:latest
ENV PYTHONPATH=$PYTHONPATH:/home/lightly_train/src
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Dockerfile used to build lightly/train:latest and inspect how the copied source is made available to Python. Verify the container's import path and reproduce the reported missing-config-file error. Done means the container uses the copied source rather than the conda-installed package and the reported startup flow works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100