Reputation: 4471
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.
t2.micro
1
1GB
Ubuntu Server 20.04 LTS (HVM), SSD Volume Type
Is there any soulutions for this?
Upvotes: 4
Views: 4943
Reputation: 1
Increasing size of /tmp mount solved my issue :
$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 4.0M 0 4.0M 0% /dev
tmpfs 475M 0 475M 0% /dev/shm
tmpfs 190M 464K 190M 1% /run
/dev/xvda1 8.0G 1.8G 6.3G 22% /
**tmpfs 475M 217M 259M 46% /tmp**
/dev/xvda128 10M 1.3M 8.7M 13% /boot/efi
tmpfs 95M 0 95M 0% /run/user/1000
/dev/xvdb 30G 329M 30G 2% /data
$ sudo mount -o remount,size=2048M /tmp
$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 4.0M 0 4.0M 0% /dev
tmpfs 475M 0 475M 0% /dev/shm
tmpfs 190M 464K 190M 1% /run
/dev/xvda1 8.0G 1.8G 6.3G 22% /
**tmpfs 2.0G 0 2.0G 0% /tmp**
/dev/xvda128 10M 1.3M 8.7M 13% /boot/efi
tmpfs 95M 0 95M 0% /run/user/1000
/dev/xvdb 30G 329M 30G 2% /data
Upvotes: 0
Reputation: 1
For me, running:
pip3 install tensorflow-cpu --no-cache-dir
Fixed it on the free tier
Upvotes: 0
Reputation: 15649
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
Upvotes: 4
Reputation: 1
I had the same issue and
pip install tensorflow-cpu
was also getting killed.
I used
pip3 install tensorflow-cpu --no-cache-dir
which worked.
Upvotes: 0
Reputation: 31
It can be fixed with the following command:
pip install tensorflow-cpu
instead of just:
pip install tensorflow
Upvotes: 3
Reputation: 794
I had the exact same problem, and I finally fixed it by doing the following:
pip install tensorflow-cpu
instead of just pip install tensorflow
Upvotes: 7
Reputation: 4471
Found out that the issues is I have not enough space in my EC2 instance. By running this command.
sudo pip install --cache-dir=/data/jimit/ --build /data/jimit/ tensorflow TMPDIR==/data/jimit/
It outputs below error.
ERROR: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device
Found it here. Cradits to @bigmac
Upvotes: 0