I want to create a docker container that needs to install python libraries. I could use something like RUN pip install requirements.txt
. However, the server where I want to run this container have not connection to the Internet. My approach is to create a new folder in my work directory (e.g. python_libraires) and put there all libraries I need to install locally the libraries.
I have an env with all Python libraries needed to run the app. I thought it would be easy to copy the directory where the libraries of my env are and then run pip locally. I also thought that this could be a typical question in Stackoverflow or similar but I cannot find a satisfactory answer although there are some people who asked something similar to this.
(If I am not wrong) the directory of my python libraries is /Volumes/MANUEL/anaconda3/envs/lookup3.6/lib/python3.6/site-packages
and to ensure that this work before creating the container I am trying this pip install -r requirements.txt --no-index --find-links file:/Volumes/MANUEL/anaconda3/envs/lookup3.6/lib/python3.6/site-packages
in a new conda env. I have created to see if I really can install libraries locally, then I would use the satisfactory approach in my container to run the same when running the container.
The error I get is this
ERROR: Could not find a version that satisfies the requirement absl-py==1.4.0 (from versions: none)
ERROR: No matching distribution found for absl-py==1.4.0
I have created this requiretments.txt file using pip freeze