Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tensorflow installation killed on AWS ec2 instance

I'm trying to use AWS EC2 instance for to test my ML project. During the package installation process of TensorFlow getting kills every time.

I'm using AWS trial EC2 t2.micro type instance for my testing purposes.

  • Type: t2.micro
  • vCPUs: 1
  • Memory: 1GB
  • Os: Ubuntu Server 20.04 LTS (HVM), SSD Volume Type

enter image description here

Is there any soulutions for this?

like image 324
Nipun Ravisara Avatar asked Oct 20 '25 15:10

Nipun Ravisara


2 Answers

I had the exact same problem, and I finally fixed it by doing the following:

  • Using free tier instance, but with 25 Gib of hard disk storage (currently, free tier covers up to 30 Gib without extra cost)
  • Install tensorflow by running pip install tensorflow-cpu instead of just pip install tensorflow
like image 87
marsolmos Avatar answered Oct 23 '25 08:10

marsolmos


Use --no-cache-dir argument with the pip installation command to resolve the tensorflow installation killed issue in aws ec2 instances.

pip3 install tensorflow --no-cache-dir

enter image description here

like image 20
Codemaker Avatar answered Oct 23 '25 07:10

Codemaker