Skip to content

Commit

Permalink
pin version.
Browse files Browse the repository at this point in the history
  • Loading branch information
anarkiwi committed Oct 29, 2023
1 parent a00fd86 commit 9f03461
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions desidulate/sidinfo2dumpcmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
from pyresidfp import SoundInterfaceDevice
from desidulate.fileio import read_csv

VICEIMAGE = 'anarkiwi/headlessvice'
VICEIMAGE = "anarkiwi/headlessvice:v1.0.0"


def main():
parser = argparse.ArgumentParser()
parser.add_argument('sidinfo', type=str)
parser.add_argument('--hvscdir', default='/local/hvsc', type=str)
parser.add_argument("sidinfo", type=str)
parser.add_argument("--hvscdir", default="/local/hvsc", type=str)
args = parser.parse_args()

df = read_csv(args.sidinfo)
Expand All @@ -26,21 +26,35 @@ def main():
cycles = int(clock_freq * (row.length + 1))
dname = os.path.join(args.hvscdir, os.path.dirname(path))
bname = os.path.basename(path)
dbname = '%s/%u/%s' % (bname, row.song, bname)
dbname = dbname.replace('.sid', '')
dbname = dbname + '-%u.dump.zst' % row.song
dbname = "%s/%u/%s" % (bname, row.song, bname)
dbname = dbname.replace(".sid", "")
dbname = dbname + "-%u.dump.zst" % row.song
dbpath = os.path.join(dname, os.path.dirname(dbname))
vice_cmd = [
'docker', 'run', '--rm', '-v', '%s:/vice' % dname, '-i', VICEIMAGE,
'vsiddump.py', os.path.join('/vice', dbname),
'-warp', '-console', '-silent',
'-limit', str(cycles),
'-tune', str(row.song),
os.path.join('/vice', bname)]
"docker",
"run",
"--rm",
"-v",
"%s:/vice" % dname,
"--name",
path.replace("/", "-") + "-" + str(row.song),
"-i",
VICEIMAGE,
"vsiddump.py",
os.path.join("/vice", dbname),
"-warp",
"-console",
"-silent",
"-limit",
str(cycles),
"-tune",
str(row.song),
os.path.join("/vice", bname),
]
if not os.path.exists(dbpath):
os.makedirs(dbpath)
print(' '.join(vice_cmd))
print(" ".join(vice_cmd))


if __name__ == '__main__':
if __name__ == "__main__":
main()

0 comments on commit 9f03461

Please sign in to comment.