Skip to content

Commit

Permalink
Merge branch 'sambarza-speed-up-build-plugins' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
pieroit committed Nov 20, 2023
2 parents 11b86cf + a6dc7a6 commit e80d41c
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions core/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@

FROM python:3.10.11-slim-bullseye

### PREPARE BUILD WITH NECESSARY FILES AND FOLDERS ###
RUN mkdir -p /app && mkdir -p /admin
COPY ./pyproject.toml /app/pyproject.toml
COPY ./cat /app/cat
COPY ./install_plugin_dependencies.py /app/install_plugin_dependencies.py

### SYSTEM SETUP ###
RUN apt-get -y update && apt-get install -y curl build-essential fastjar libmagic-mgc libmagic1 mime-support && \
apt-get clean && \
Expand All @@ -16,12 +10,21 @@ RUN apt-get -y update && apt-get install -y curl build-essential fastjar libmagi
WORKDIR /admin
RUN curl -sL https://github.com/cheshire-cat-ai/admin-vue/releases/download/Admin/develop.zip | jar -xv

### INSTALL PYTHON DEPENDENCIES (Core and Plugins) ###
### PREPARE BUILD WITH NECESSARY FILES AND FOLDERS ###
COPY ./pyproject.toml /app/pyproject.toml

### INSTALL PYTHON DEPENDENCIES (Core) ###
WORKDIR /app
RUN pip install -U pip && \
pip install --no-cache-dir . &&\
python3 -c "import nltk; nltk.download('punkt');nltk.download('averaged_perceptron_tagger')" &&\
python3 install_plugin_dependencies.py
python3 -c "import nltk; nltk.download('punkt');nltk.download('averaged_perceptron_tagger')"

### COPY PLUGINS ###
COPY ./cat/plugins /app/cat/plugins

### INSTALL PYTHON DEPENDENCIES (Plugins) ###
COPY ./install_plugin_dependencies.py /app/install_plugin_dependencies.py
RUN python3 install_plugin_dependencies.py

### FINISH ###
CMD python3 -m cat.main

0 comments on commit e80d41c

Please sign in to comment.