このメモでは、ABCIでのJupyter notebookの利用方法について説明します。
以下の説明はmacOSを対象とします。macOSでは、デフォルトでOpenSSH 7.3以降がインストールされています。また、ABCI上でのPython環境の作り方などの説明は省略します。
diff --git a/installer.py b/installer.py | |
index e3c723e..3ec86ff 100755 | |
--- a/installer.py | |
+++ b/installer.py | |
@@ -167,8 +167,8 @@ def check_singularity(): | |
run_and_return(["singularity", "--version"], "singularity --version failed. Please check installation of singularity.") | |
cmd_proc = subprocess.Popen(["singularity", "--version"], stdout = subprocess.PIPE, universal_newlines=True) | |
singularity_version = cmd_proc.stdout.readline().split('.') | |
- if "singularity version " in singularity_version[0]: | |
- if os.getuid() != 0: |
#!/bin/sh | |
# | |
# Step 1. Install proctools to use "pgrep" command. | |
# | |
# Step 2. Configure your .ssh/config to include: | |
# | |
# Host proxy-host | |
# HostName proxy-host.example.com | |
# User a12345 | |
# DynamicForward localhost:1080 |
以下ではアクセスサーバ (as.abci.ai) へのポートフォワーディングによるトンネルを作った上で、別ターミナルでSSHトンネルを用いてインタラクティブノードにアクセスする方法を説明しています。
しかし、OpenSSHを用いるともっと簡便にインタラクティブノードにアクセスできます。このメモではその方法を説明します。
diff --git a/FiscalYearlyArchives/fiscal_yearly_archives.pl b/FiscalYearlyArchives/fiscal_yearly_archives.pl | |
index 4c57e36..fedac03 100644 | |
--- a/FiscalYearlyArchives/fiscal_yearly_archives.pl | |
+++ b/FiscalYearlyArchives/fiscal_yearly_archives.pl | |
@@ -57,7 +57,7 @@ sub archive_fiscal_year { | |
my $tag = $ctx->stash('tag'); | |
return $ctx->error(MT->translate("You used an [_1] tag without a date context set up.", "MT$tag")) | |
unless defined $ts; | |
- ts2fiscal($ts); | |
+ ts2fiscal($ts) + 1; |
require 'formula' | |
class ZooKeeperLib < Requirement | |
def initialize | |
@zk = Formula.factory('zookeeper') | |
end | |
def fatal? | |
true | |
end |
-- Eject and Sleep | |
-- ejectableなディスクをアンマウントしてスリープ | |
-- アンマウント状態で実行するとマウント | |
set diskNames to {"HD-PATU3", "Time Machine"} | |
tell application "Finder" | |
set disksToEject to {} | |
repeat with diskName in diskNames | |
if disk diskName exists then | |
set aDisk to (disk diskName) |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import sys | |
import csv | |
from icalendar import Calendar, Event | |
from datetime import datetime | |
ical = Calendar() | |
ical.add('version', '2.0') |