Skip to content

Commit

Permalink
Upgrade to python3 and boto3. Add new blender 2.83.4 AMI (#1)
Browse files Browse the repository at this point in the history
* Remove paracurl. Migrate to python3. Migrate to boto3

* More boto3 updates

* Update setup.py, remove .bak files

* Complete boto3 migration

* Fix boto object parsing

* More python3 updates

* Various fixes

* Minor fixes

* Remove TODO

* Update to AMI with python3 (jamesyonan#2)
  • Loading branch information
msmith93 authored Aug 14, 2020
1 parent 733c136 commit 6ccc712
Show file tree
Hide file tree
Showing 20 changed files with 338 additions and 966 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ task_count
task_last
DONE
test/work
build
build
venv
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ This tutorial is intended for use on macOS or Linux, and Python 2 is required.
If you don't have an AWS (Amazon Web Services) account, sign up
for one now.

First, install the "boto" python library. This library is used by
First, install the "boto3" python library. This library is used by
Brenda to interact with AWS.

Next, download and install Brenda on the client machine.

$ git clone http://github.com/gwhobbs/brenda.git
$ git clone http://github.com/msmith93/brenda.git
$ cd brenda
$ python setup.py install
$ python3 setup.py install

### EC2 key pair setup

Expand Down Expand Up @@ -940,17 +940,18 @@ Now you can append `-P cuda_setup.py` to your frame template to tell Blender to
```bash
$ add-apt-repository ppa:thomas-schiex/blender
$ apt-get update
$ apt-get install -y blender python-pip gcc python-dev libcurl4-openssl-dev git unzip
$ pip install -U boto
$ pip install -U s3cmd
$ apt-get install -y blender python3-pip gcc python3-dev libcurl4-openssl-dev git unzip
$ pip3 install -U boto3
$ pip3 install -U future
$ pip3 install -U s3cmd
```

#### 4. Next, download and install Brenda.

```bash
$ git clone http://github.com/gwhobbs/brenda.git
$ git clone http://github.com/msmith93/brenda.git
$ cd brenda
$ python setup.py install
$ python3 setup.py install
```

#### 5. Prepare for publishing (optional)
Expand Down
5 changes: 3 additions & 2 deletions brenda-ebs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from __future__ import print_function
import sys, os, optparse
from brenda import aws, ebs, config, run, version

Expand Down Expand Up @@ -73,7 +74,7 @@ Examples:
( opts, args ) = parser.parse_args()
#print "OPTS", (opts, args)
if not args:
print >>sys.stderr, "no work, run with -h for usage"
print("no work, run with -h for usage", file=sys.stderr)
sys.exit(2)

# Get configuration
Expand All @@ -86,7 +87,7 @@ Examples:
elif args[0] == 'existing':
ebs.create_instance_with_ebs(opts, conf, new=False)
else:
print >>sys.stderr, "unrecognized command:", args[0]
print("unrecognized command:", args[0], file=sys.stderr)
sys.exit(2)

main()
5 changes: 3 additions & 2 deletions brenda-run
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from __future__ import print_function
import sys, os, optparse
from brenda import aws, config, run, version

Expand Down Expand Up @@ -138,7 +139,7 @@ Examples:
( opts, args ) = parser.parse_args()
#print "OPTS", (opts, args)
if not args:
print >>sys.stderr, "no work, run with -h for usage"
print("no work, run with -h for usage", file=sys.stderr)
sys.exit(2)

# Get configuration
Expand All @@ -165,7 +166,7 @@ Examples:
elif args[0] == 'script':
run.script(opts, conf)
else:
print >>sys.stderr, "unrecognized command:", args[0]
print("unrecognized command:", args[0], file=sys.stderr)
sys.exit(2)

main()
5 changes: 3 additions & 2 deletions brenda-work
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from __future__ import print_function
import sys, os, optparse
from brenda import config, work, aws, version

Expand Down Expand Up @@ -100,7 +101,7 @@ Examples:
( opts, args ) = parser.parse_args()
#print "OPTS", (opts, args)
if not args:
print >>sys.stderr, "no work, run with -h for usage"
print("no work, run with -h for usage", file=sys.stderr)
sys.exit(2)

# Get configuration
Expand All @@ -115,7 +116,7 @@ Examples:
elif args[0] == 'reset':
work.reset(opts, args, conf)
else:
print >>sys.stderr, "unrecognized command:", args[0]
print("unrecognized command:", args[0], file=sys.stderr)
sys.exit(2)

main()
2 changes: 1 addition & 1 deletion brenda/ami.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# An AMI that contains Blender and Brenda (may be None)
AMI_ID="ami-0f423cdef7e0d3b82"
AMI_ID="ami-063c549d731c22d8e"
Loading

0 comments on commit 6ccc712

Please sign in to comment.