Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
383af5a61e
|
|||
|
67593cc678
|
|||
|
4570d10238
|
|||
|
c05cd29028
|
@@ -11,9 +11,9 @@ RUN pip install --no-cache-dir --upgrade torch torchvision mokuro
|
||||
|
||||
# create a user to run the application
|
||||
RUN useradd -m mokurouser \
|
||||
&& mkdir -p /home/mokurouser/mokuro \
|
||||
&& chown -R mokurouser:mokurouser /home/mokurouser
|
||||
&& mkdir -p /mokuro \
|
||||
&& chown -R mokurouser:mokurouser /mokuro
|
||||
|
||||
WORKDIR /home/mokurouser/mokuro
|
||||
WORKDIR /mokuro
|
||||
|
||||
COPY . .
|
||||
|
||||
@@ -8,8 +8,8 @@ services:
|
||||
container_name: mokuro
|
||||
user: 1000:1000
|
||||
volumes:
|
||||
- ~/S/japanese/manga:/home/mokurouser/mokuro
|
||||
command: mokuro --parent_dir One\ Piece\ Color --disable_confirmation && ./zip.sh "One Piece Color"
|
||||
- ~/S/japanese/manga:/mokuro/manga
|
||||
command: ./run.sh "manga/One Piece Color"
|
||||
runtime: nvidia
|
||||
restart: no
|
||||
network_mode: host
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# Usage: ./zip.sh [directory]
|
||||
# Default is current directory
|
||||
#!/usr/bin/env sh
|
||||
set -Eeuo pipefail
|
||||
|
||||
DIR="${1:-.}"
|
||||
|
||||
mokuro --parent_dir "$DIR" --disable_confirmation
|
||||
|
||||
cd "$DIR" || exit
|
||||
|
||||
for f in *.mokuro; do
|
||||
@@ -12,10 +12,14 @@ for f in *.mokuro; do
|
||||
base="${f%.mokuro}"
|
||||
dir="$base"
|
||||
zipfile="$base.zip"
|
||||
if [ -d "$dir" ]; then
|
||||
if [ -f "$zipfile" ]; then
|
||||
echo "Warning: Zip file $zipfile already exists, skipping."
|
||||
elif [ -d "$dir" ]; then
|
||||
echo "Zipping: $zipfile <- $f $dir/"
|
||||
zip -qr "$zipfile" "$f" "$dir"
|
||||
else
|
||||
echo "Warning: Directory '$dir' not found for '$f', skipping."
|
||||
fi
|
||||
done
|
||||
|
||||
rm -rf ./*.html
|
||||
Reference in New Issue
Block a user