I am working on a python project and I need to create a docker image for testing. In my project I have a main.py file that has the statement
from <module> import *. here represents a folder in which I put all the other files of my project.
The dockerfile is as follows:
FROM continuumio/miniconda3
COPY parcellation_env.yml .
RUN conda env create -f parcellation_env.yml
SHELL ["conda", "run", "-n", "parcellation_env", "/bin/bash", "-c"]
COPY main.py .
ADD module/ .
ENTRYPOINT ["conda", "run", "-n", "parcellation_env", "python", "main.py", "-C", "white_matter_parcellation/config/config_point_autoencoder.yaml", "--use_splits", "-y"]
When creating the image, everything works fine, but when I try to run the image in a container I get a No module named "module" error, signaling that something went wrong.
I'm new to docker and this is my first time using it, does anyone know what went wrong?
Note: the error occurs both if I put ADD and COPY for module/, I already tried changing that
EDIT:
The folder structure of my project is currently the following
|--main.py
|--module
|--parcellation_env.yml
|--__init__.py
|----folder1
|------folder_1_files
|------folder_1_init
|----folder2
|------folder_2_files
|------folder_3...
|------folder_2_init
...