Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
195 views
in Technique[技术] by (71.8m points)

python - How to avoid running out of space on App Engine due to Libraries?

My current workflow on Google's App Engine looks like the following commands:

cd <my_project_directory>
git pull
cd <my_specific_project>
virtualenv --python python3 ~/envs/aws99
source ~/envs/aws99/bin/activate
pip install -r requirements.txt

It is at this point that, if I have done this enough times since my last removal of $HOME, I will get:

Could not install packages due to an EnvironmentError: [Errno 28] No space left on device

This is because my libraries have used up all available space in my home directory.

My workflow is very inefficient because, to resolve this, I delete the whole drive and start from scratch (cloning git again)

sudo rm -rf $HOME

Although I can instead install requirements to new temp directories with more space, I'd like to just overwrite my existing requirements or avoid continuously adding to the space in my home directory until I have to erase it again.

What is the proper way this workflow should go? Can I issue a better requirements command for this? If not, is there a less nuclear option to clean up all libraries in one command instead of having to go to a specific directory and clear up space file-by-file?

question from:https://stackoverflow.com/questions/65866392/how-to-avoid-running-out-of-space-on-app-engine-due-to-libraries

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...