CDOM201 commited on
Commit
e9c9423
1 Parent(s): 60aea91

Unidic Troubleshooting

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -1
Dockerfile CHANGED
@@ -1,5 +1,6 @@
1
  FROM python:3.9-slim
2
  WORKDIR /app
 
3
  COPY . /app
4
 
5
  RUN apt-get update && apt-get install -y \
@@ -7,8 +8,9 @@ RUN apt-get update && apt-get install -y \
7
  && rm -rf /var/lib/apt/lists/*
8
 
9
  RUN pip install -e .
 
 
10
  RUN python -m unidic download
11
  RUN python melo/init_downloads.py
12
- RUN pip install --upgrade --force-reinstall unidic==1.1.0
13
 
14
  CMD ["python", "./melo/app.py", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.9-slim
2
  WORKDIR /app
3
+ RUN wget https://cotonoha-dic.s3-ap-northeast-1.amazonaws.com/unidic-3.1.0.zip -O /usr/local/lib/python3.9/site-packages/unidic/unidic.zip
4
  COPY . /app
5
 
6
  RUN apt-get update && apt-get install -y \
 
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
  RUN pip install -e .
11
+ COPY undi/ /usr/local/lib/python3.9/site-packages/unidic/
12
+ RUN sed -i '93s/./ download_and_clean()/;63s/./ # download_process/' /usr/local/lib/python3.9/site-packages/unidic/download.py
13
  RUN python -m unidic download
14
  RUN python melo/init_downloads.py
 
15
 
16
  CMD ["python", "./melo/app.py", "--host", "0.0.0.0", "--port", "7860"]