I have a system which uses docker compose.
example docker-compose file:
version: '3'
services:
base:
container_name: base
image: <hub host>/base
build:
context: ..
dockerfile: BaseDockerfile
environment:
- PYTHONPATH=/usr/local/lib/python3.6/site-packages
volumes:
- data:/volumes/data/
postgres:
container_name: postgres
image: "postgres:latest"
ports:
- 5432:5432
Now, I use this docker-compose file in two different ways - Online and Offline.
In the online mode I run docker-compose build then docker-compose push then ssh to the server I want to deploy it and pull the images and run (docker-compose pull && docker-compose up).
In the offline method I run docker-compose build (same as first one) and then docker save each image to a .tar file then load it using the docker load -i <file name> method, then run docker-compose up
For some reason I get an error (relating to numpy package missfit) in the offline method but not in the server.
I thought there shouldn't be any difference between the methods because they both build the same images and run the containers with the same parameters (that are defined in the docker-compose file).
I tried docker system prune && docker volume prune in all machines that were related to make sure its not a caching issue.
Any ideas as to what the differences between the two methods could be?
EDIT: Saving dockers:
#!/usr/bin/env bash
for image in $docker_hub/base redis postgres
do
echo "Saving $image"
docker save $image | gzip > $directory/${image//$docker_hub}.tar.gz
done
image loading:
print "Loading images"
for file in ./*.tar.gz
do
echo "Loading file: "$file
docker load -i $file
done
The error I have binary file related:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/site-packages/pandas/core/frame.py", line 1945, in to_parquet
compression=compression, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pandas/io/parquet.py", line 256, in to_parquet
impl = get_engine(engine)
File "/usr/local/lib/python3.6/site-packages/pandas/io/parquet.py", line 25, in get_engine
return FastParquetImpl()
File "/usr/local/lib/python3.6/site-packages/pandas/io/parquet.py", line 180, in __init__
import fastparquet
File "/usr/local/lib/python3.6/site-packages/fastparquet/__init__.py", line 8, in <module>
from .core import read_thrift
File "/usr/local/lib/python3.6/site-packages/fastparquet/core.py", line 13, in <module>
from . import encoding
File "/usr/local/lib/python3.6/site-packages/fastparquet/encoding.py", line 11, in <module>
from .speedups import unpack_byte_array
File "__init__.pxd", line 861, in init fastparquet.speedups
ValueError: numpy.ufunc has the wrong size, try recompiling. Expected 192, got 216