Skip to content

Export PYTHOPATH inside docker container #248

@Daniel595

Description

@Daniel595

💡 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions