Hi,
I am just setup a new droplet and update/upgrade and when I pip install tensorflow it was killed
(my_env) root@cryptofeed:~# pip install tensorflow Collecting tensorflow Downloading tensorflow-2.4.0-cp38-cp38-manylinux2010_x86_64.whl (394.8 MB) |████████████████████████████████| 394.7 MB 24.4 MB/s eta 0:00:01Killed (my_env) root@cryptofeed:~#
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @paveen,
Most probably the droplet’s RAM was not enough and the server killed the process. In such cases, I recommend creating swap in order for the droplet to handle processes that take more RAM than what it has.
How to add Swap File First SSH to your droplet
ssh root@YourDropletIP
Once inside, create a file that will be used for swap:
sudo fallocate -l 1G /swapfile
If faillocate is not installed or if you get an error message saying fallocate failed: Operation not supported then you can use the following command to create the swap file:
sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576
Only the root user should be able to write and read the swap file. To set the correct permissions type:
chmod 600 /swapfile
Use the mkswap utility to set up the file as Linux swap area:
sudo mkswap /swapfile
Enable the swap with the following command:
sudo swapon /swapfile
To make the change permanent open the /etc/fstab file and append the following line:
/swapfile swap swap defaults 0 0
Regards, KFSys
This command works for me . pip install --no-cache-dir --upgrade tensorflow
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.