- Install Virtualenvwrapper - this is my favorite way of creating virtualenvs
sudo apt-get install virtualenvwrapper
- Install on the compute as well, where
4
is the number of compute nodes:
sudo apt-get install virtualenvwrapper
4
is the number of compute nodes:#!/bin/bash | |
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance | |
# with the License. A copy of the License is located at | |
# | |
# http://aws.amazon.com/apache2.0/ | |
# | |
# or in the "LICENSE.txt" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES | |
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions and |
Make sure the instance has arn:aws:iam::aws:policy/AmazonEC2FullAccess
permissions.
Create a script called resize.sh
with the following contents:
#!/bin/bash
# Specify the desired volume size in GiB as a command line argument. If not specified, default to 20 GiB.
SIZE=${1:-20}
If your cluster tries 10 times to launch instances and fails, it'll automatically go into PROTECTED
mode. This disables instance provisioning until the compute fleet is restarted.
You'll see inact
as the status of the queue when the cluster is in PROTECTED
mode:
[ec2-user@ip-10-0-0-98 ~]$ sinfo
PARTITION AVAIL TIMELIMIT NODES STATE NODELIST
default* inact infinite 2 idle~ spot-dy-compute-[1-100]
#!/bin/bash | |
# Usage: bash remove-bucket.sh bucket1 | |
for bucket in $(aws s3 ls | grep $1 | awk '{ print $3}'); do | |
echo "Deleting ${bucket}..." | |
aws s3 rm --recursive s3://${bucket}; | |
aws s3 rb --force s3://${bucket}; | |
done |