mirror of
https://github.com/Alexander-D-Karpov/akarpov
synced 2024-11-10 21:56:34 +03:00
added preview installation
This commit is contained in:
parent
13346c0fb4
commit
703d9a681f
|
@ -9,6 +9,7 @@ Writen in Python 3.11 and Django 4.2
|
|||
### installation
|
||||
```shell
|
||||
$ poetry install & poetry shell
|
||||
$ ./spacy_setup.sh
|
||||
$ python3 manage.py migrate
|
||||
```
|
||||
|
||||
|
@ -25,6 +26,10 @@ $ uvicorn redirect.app:app --reload
|
|||
```shell
|
||||
$ docker-compose -f local.yml up
|
||||
```
|
||||
Install file preview dependencies
|
||||
```shell
|
||||
$ docker-compose -f local.yml exec django /install_preview_dependencies
|
||||
```
|
||||
- server - http://127.0.0.1:8000
|
||||
- mail - http://127.0.0.1:8025
|
||||
|
||||
|
@ -44,3 +49,4 @@ $ mypy --config-file setup.cfg akarpov
|
|||
- test platform
|
||||
- short link generator
|
||||
- about me app
|
||||
- gallery
|
||||
|
|
|
@ -50,6 +50,10 @@ COPY ./compose/local/django/start /start
|
|||
RUN sed -i 's/\r$//g' /start
|
||||
RUN chmod +x /start
|
||||
|
||||
COPY ./compose/local/django/spacy_setup /spacy_setup
|
||||
RUN sed -i 's/\r$//g' /spacy_setup
|
||||
RUN chmod +x /spacy_setup
|
||||
|
||||
COPY ./compose/local/django/install_preview_dependencies /install_preview_dependencies
|
||||
RUN sed -i 's/\r$//g' /install_preview_dependencies
|
||||
RUN chmod +x /install_preview_dependencies
|
||||
|
|
|
@ -3,8 +3,11 @@
|
|||
apt-get update
|
||||
apt-get install -y poppler-utils libfile-mimeinfo-perl ghostscript libsecret-1-0 zlib1g-dev libjpeg-dev imagemagick libmagic1 libreoffice inkscape xvfb
|
||||
apt-get install -y libxml2-dev libxslt1-dev antiword unrtf pstotext tesseract-ocr flac lame libmad0 libsox-fmt-mp3 sox swig
|
||||
apt-get install -y python-dev libxml2-dev libxslt1-dev antiword unrtf poppler-utils pstotext tesseract-ocr \
|
||||
flac ffmpeg lame libmad0 libsox-fmt-mp3 sox libjpeg-dev swig
|
||||
wget https://github.com/jgraph/drawio-desktop/releases/download/v13.0.3/draw.io-amd64-13.0.3.deb
|
||||
dpkg -i draw.io-amd64-13.0.3.deb
|
||||
/spacy_setup
|
||||
rm draw.io-amd64-13.0.3.deb
|
||||
apt-get purge -y --auto-remove -o APT:AutoRemove:RecommendsImportant=false && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
|
3
compose/local/django/spacy_setup
Executable file
3
compose/local/django/spacy_setup
Executable file
|
@ -0,0 +1,3 @@
|
|||
python -m spacy download en_core_web_lg
|
||||
python -m spacy download xx_sent_ud_sm
|
||||
python -m spacy download ru_core_news_lg
|
1916
poetry.lock
generated
1916
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
|
@ -100,6 +100,8 @@ yt-dlp = "^2023.7.6"
|
|||
pytube = "^15.0.0"
|
||||
urllib3 = ">=1.26"
|
||||
requests = ">=2.25"
|
||||
spacy = {extras = ["lookups"], version = "^3.6.1"}
|
||||
spacy-transformers = "^1.2.5"
|
||||
|
||||
|
||||
[build-system]
|
||||
|
|
4
spacy_setup.sh
Executable file
4
spacy_setup.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
python -m spacy download en_core_web_lg
|
||||
python -m spacy download xx_sent_ud_sm
|
||||
python -m spacy download ru_core_news_lg
|
Loading…
Reference in New Issue
Block a user