Spaces:
Running
Running
use extracted req.txt & upgrade version
Browse files- Dockerfile +4 -3
- conda.yaml +1 -8
- requirements-moeflow.txt +0 -67
Dockerfile
CHANGED
@@ -4,17 +4,18 @@ COPY . /home/mambauser/bootstrap
|
|
4 |
RUN --mount=type=cache,uid=57439,gid=57439,target=/opt/conda/pkgs micromamba env create --yes --file /home/mambauser/bootstrap/conda.yaml \
|
5 |
&& micromamba install -n base --yes curl
|
6 |
USER root
|
7 |
-
# for some
|
8 |
RUN useradd -m -u 1000 runtime-user
|
9 |
WORKDIR /app
|
10 |
RUN chown -Rc runtime-user /app
|
11 |
USER runtime-user
|
12 |
RUN mkdir -pv /app/storage \
|
13 |
&& micromamba run -n mit-py311 python3 -mvenv --system-site-packages /app/venv
|
14 |
-
|
15 |
# HF does not seem to have layer cache anyway
|
16 |
# (must specify -n base to use installed curl)
|
17 |
-
RUN micromamba run -n base curl -L https://github.com/moeflow-com/manga-image-translator/archive/
|
|
|
18 |
# NOTE for unknown reason we need to download here. or there will be runtime file permission error
|
19 |
RUN venv/bin/python docker_prepare.py --models ocr.48px,ocr.48px_ctc,ocr.32px,ocr.mocr,detector.default,detector.ctd,detector.craft,detector.none
|
20 |
CMD venv/bin/python gradio-main.py
|
|
|
4 |
RUN --mount=type=cache,uid=57439,gid=57439,target=/opt/conda/pkgs micromamba env create --yes --file /home/mambauser/bootstrap/conda.yaml \
|
5 |
&& micromamba install -n base --yes curl
|
6 |
USER root
|
7 |
+
# for some reason huggingface run container images as uid=1000
|
8 |
RUN useradd -m -u 1000 runtime-user
|
9 |
WORKDIR /app
|
10 |
RUN chown -Rc runtime-user /app
|
11 |
USER runtime-user
|
12 |
RUN mkdir -pv /app/storage \
|
13 |
&& micromamba run -n mit-py311 python3 -mvenv --system-site-packages /app/venv
|
14 |
+
|
15 |
# HF does not seem to have layer cache anyway
|
16 |
# (must specify -n base to use installed curl)
|
17 |
+
RUN micromamba run -n base curl -L https://github.com/moeflow-com/manga-image-translator/archive/f783108054bd4ea452e381fae6ac3ea10d0a8327.tar.gz | tar xvz --strip-components=1
|
18 |
+
RUN venv/bin/pip install --no-cache-dir -r requirements-moeflow.txt
|
19 |
# NOTE for unknown reason we need to download here. or there will be runtime file permission error
|
20 |
RUN venv/bin/python docker_prepare.py --models ocr.48px,ocr.48px_ctc,ocr.32px,ocr.mocr,detector.default,detector.ctd,detector.craft,detector.none
|
21 |
CMD venv/bin/python gradio-main.py
|
conda.yaml
CHANGED
@@ -1,12 +1,5 @@
|
|
1 |
name: mit-py311
|
2 |
channels:
|
3 |
- conda-forge
|
4 |
-
- pytorch
|
5 |
-
- nvidia
|
6 |
dependencies:
|
7 |
-
- python
|
8 |
-
- pytorch==2.2.2
|
9 |
-
- torchvision==0.17.2
|
10 |
-
- torchaudio==2.2.2
|
11 |
-
- pytorch-cuda=12.1
|
12 |
-
- numpy<2
|
|
|
1 |
name: mit-py311
|
2 |
channels:
|
3 |
- conda-forge
|
|
|
|
|
4 |
dependencies:
|
5 |
+
- python<3.12
|
|
|
|
|
|
|
|
|
|
requirements-moeflow.txt
DELETED
@@ -1,67 +0,0 @@
|
|
1 |
-
# vim: ft=requirements
|
2 |
-
# networkx
|
3 |
-
# torch
|
4 |
-
# groq
|
5 |
-
# torchvision
|
6 |
-
# torch-summary
|
7 |
-
einops
|
8 |
-
scikit-image
|
9 |
-
opencv-python
|
10 |
-
pyclipper
|
11 |
-
shapely
|
12 |
-
# requests
|
13 |
-
# cryptography
|
14 |
-
# freetype-py
|
15 |
-
# aiohttp
|
16 |
-
tqdm
|
17 |
-
# deepl
|
18 |
-
# ImageHash
|
19 |
-
# kornia
|
20 |
-
# backports.cached-property
|
21 |
-
# huggingface_hub
|
22 |
-
# transformers
|
23 |
-
py3langid==0.2.2
|
24 |
-
# sentencepiece
|
25 |
-
# editdistance
|
26 |
-
# numpy==1.26.4
|
27 |
-
# tensorboardX
|
28 |
-
# websockets
|
29 |
-
# protobuf
|
30 |
-
# ctranslate2
|
31 |
-
colorama
|
32 |
-
openai==1.63.0
|
33 |
-
tiktoken
|
34 |
-
# httpx==0.27.2 # stop before blocking change in 0.28.0
|
35 |
-
# open_clip_torch
|
36 |
-
# safetensors
|
37 |
-
pandas
|
38 |
-
onnxruntime==1.20.1
|
39 |
-
timm
|
40 |
-
omegaconf
|
41 |
-
python-dotenv
|
42 |
-
# nest-asyncio
|
43 |
-
# marshmallow
|
44 |
-
# cython
|
45 |
-
# aioshutil
|
46 |
-
# aiofiles
|
47 |
-
# arabic-reshaper
|
48 |
-
# pyhyphen
|
49 |
-
langcodes
|
50 |
-
manga-ocr
|
51 |
-
# langdetect
|
52 |
-
# pydensecrf@https://github.com/lucasb-eyer/pydensecrf/archive/refs/heads/master.zip
|
53 |
-
# accelerate
|
54 |
-
# bitsandbytes
|
55 |
-
# uvicorn
|
56 |
-
# fastapi
|
57 |
-
# pydantic
|
58 |
-
# python-multipart
|
59 |
-
google-genai==1.8.0
|
60 |
-
rich
|
61 |
-
|
62 |
-
paddleocr==2.10.0
|
63 |
-
paddlepaddle==2.6.2
|
64 |
-
paddlepaddle-gpu==2.6.2; sys_platform != 'darwin'
|
65 |
-
|
66 |
-
gradio==5.23.0
|
67 |
-
orjson==3.10.11
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|