I am new to Docker but have had success in Dokcerizing some existing python code using the docker toolbox for windows 10.
Currently i have this setup:
picture of working python code in Docker container
This is done with the Dockerfile:
FROM python:2.7.13
WORKDIR /root
COPY ./requirements.txt /root/requirements.txt
RUN pip install -r requirements.txt
COPY . /root
CMD ["python", "main.py"]
and all my code sits in the container with a bunch of CSV and .pkl files. The thing is that the CSV and .pkl files change daily so after some reading I think i can split these files out into a volume or maybe even a separate container that i can modify and upload everyday without changing the main python script as its 1.4G in size and my upload speed is 40kbps (at best).
Picture of container setup that i would like
So im wondering how would i reference the other container/volume so i could access the CSV and /pkl files in my main body Python code? At the moment everything sits in the same directory so there is no problem i just call the .csv/.pkl name and it works
#open the local .csv file
data = pd.read_csv(csv_select)
#open the local .pkl file
pickled_list = pickle.load(open(can_cat+".pkl","rb"))
How would i reference the above code to open a csv/pkl file from a separate container??
I have read heaps of stackoverflow posts and the docker documentation but can't seem to understand how to make it work, any help would be appreciated.