cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1825
Views
0
Helpful
6
Replies

Docker container for stateful App

Yaniv Rozenboim
Level 1
Level 1

Hi,

 

I'm building docker container for a stateful app I'm working on and I installed the cobra SDK on it:

pip install acicobra-4.2_3l-py2.py3-none-any.whl
pip install acimodel-4.2_3l-py2.py3-none-any.whl

 

I noticed that the size of these modules is huge and takes 877MB out of the total 1GB of my container size:

/ # du | sort -k1,1n -r | tail -20
21628 ./usr/local/lib/python3.8/site-packages/cobra/modelimpl/pol
22264 ./usr/local/lib/python3.8/site-packages/cobra/modelimpl/copp
23252 ./usr/local/lib/python3.8/site-packages/cobra/modelimpl/eqptcapacity
27772 ./usr/local/lib/python3.8/site-packages/cobra/modelimpl/eqpt/__pycache__
28240 ./usr/local/lib/python3.8/site-packages/cobra/modelimpl/action/__pycache__
30968 ./usr/local/lib/python3.8/site-packages/cobra/modelimpl/condition
31148 ./usr/local/lib/python3.8/site-packages/cobra/modelimpl/cloud
34864 ./usr/local/lib/python3.8/config-3.8-x86_64-linux-gnu
39600 ./usr/local/lib/python3.8/site-packages/cobra/modelimpl/fault/__pycache__
62740 ./usr/local/lib/python3.8/site-packages/cobra/modelimpl/action
68836 ./usr/local/lib/python3.8/site-packages/cobra/modelimpl/eqpt
88640 ./usr/local/lib/python3.8/site-packages/cobra/modelimpl/fault
874420 ./usr/local/lib/python3.8/site-packages/cobra/modelimp
877316 ./usr/local/lib/python3.8/site-packages/cobra911296 ./usr/local/lib/python3.8/site-packages 981676 ./usr/local/lib/python3.8 1000580 ./usr/local/lib 1001748 ./usr/local 1008224 ./usr 1016316 .

 

Having the 1GB limitation for the container size makes it very difficult to install other python packages that are required for my container (Flask, requests, SQLalchemy etc.)

 

The reference docker file from the developer guide is using python2 which I would like to avoid so that's why I'm not using it.

 

Please advise if there is a way to minimize the cobra SDK size or alternatively to increase the 1GB image limit.

 

Thanks,

Yaniv

 

 

1 Accepted Solution

Accepted Solutions


@Yaniv Rozenboim wrote:

My container works fine but perhaps it's better to document that the 1GB isn't really a hard limit but more of a recommendation.


Probably that's why it's mentioned "should" in the cfg guide.


I also think it would make sense to publish a new reference docker image that includes the cobra SDK running on Python3 (especially now with Python2 reaching EOL).


I fully agree! Also, python2 is already EOL, from all perspectives. Whoever is doing new projects in python2 should be punished. just my opinion :)

 

View solution in original post

6 Replies 6

Sergiu.Daniluk
VIP Alumni
VIP Alumni

Hi @Yaniv Rozenboim 

I know that the guidelines and limitation says that the docker image should not exceed 1GB, but looking at the size you have, you are at 1,01GB so that's not that much over the 'soft' limit.

Have you tested the app like this? Do you see any problems running it?

 

Regards,

Sergiu

 

 

Thanks for your quick response

(for some reason I can't find my question in the forum again and I get "Marked as spam. If you believe this is an error, submit an abuse report." Do you know why?)



My container works but I'm concerned of what would happen if I'll need to add more packages and the size will increase.

What is the Docker image hard limit? Is there such?



It doesn't make much sense that you have a 1GB limit published where the container starting point with the cobra SDK and python already take more than 90% out of it.

Hi,



Indeed I do not see your post anymore, but I received you message. You should report it as this is clearrly an error.

I am not aware of any hard limits for apps. I believe the recommandation is to keep it for 1GB is because the APIC filesystem is already limited.

But if you see it working I guess is fine to use it :)

You can ask this question on the official facebook Cisco ACI user group page: https://www.facebook.com/groups/1028679983855301

There are a lot of Cisoc BU, TAC, TMEs present in the group.



Cheers,

Sergiu


Your post is back! ^_^

Thanks a lot!

My container works fine but perhaps it's better to document that the 1GB isn't really a hard limit but more of a recommendation.

I also think it would make sense to publish a new reference docker image that includes the cobra SDK running on Python3 (especially now with Python2 reaching EOL).

 


@Yaniv Rozenboim wrote:

My container works fine but perhaps it's better to document that the 1GB isn't really a hard limit but more of a recommendation.


Probably that's why it's mentioned "should" in the cfg guide.


I also think it would make sense to publish a new reference docker image that includes the cobra SDK running on Python3 (especially now with Python2 reaching EOL).


I fully agree! Also, python2 is already EOL, from all perspectives. Whoever is doing new projects in python2 should be punished. just my opinion :)

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Save 25% on Day-2 Operations Add-On License