forked from swirlai/swirl-search
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
59 lines (46 loc) · 1.62 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Use an official Python runtime as a parent image
FROM python:3.12.4-slim-bookworm
# Upgrade pip to the specified version or higher
RUN pip install --no-cache-dir --upgrade 'pip>=24.0'
# try to upgrade to a more recent version of openssl
RUN apt-get update
RUN apt-get -y upgrade openssl
# install jq
RUN apt-get -y install jq
# RUN sudo echo 'nameserver 8.8.8.8'>/etc/resolv.conf
RUN apt-get update -y
RUN apt-get install apt-file -y
RUN apt-file update
RUN apt-get install -y python3-dev build-essential
RUN apt-get install -y procps
RUN apt-get install -y libpq-dev
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir --upgrade grpcio
ADD requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# install redis
RUN apt-get install -y redis-server
# install requirements
RUN python -m spacy download en_core_web_lg
RUN python -m nltk.downloader stopwords
RUN python -m nltk.downloader punkt
# Copy Swirl App to container
RUN mkdir /app
COPY ./db.sqlite3.dist /app/db.sqlite3
COPY ./.env.docker /app/.env
COPY ./install-ui.sh /app/install-ui.sh
ADD ./swirl /app/swirl
# Install Galaxy UI
RUN mkdir -p /app/swirl/static/galaxy
COPY --from=swirlai/spyglass:latest /usr/src/spyglass/ui/dist/spyglass/browser/. /app/swirl/static/galaxy
COPY --from=swirlai/spyglass:latest /usr/src/spyglass/ui/config-swirl-demo.db.json /app/
ADD ./swirl_server /app/swirl_server
ADD ./SearchProviders /app/SearchProviders
ADD ./DevUtils /app/DevUtils
ADD ./Data /app/Data
ADD ./uploads /app/uploads
ADD ./swirl.py /app/swirl.py
ADD ./swirl_load.py /app/swirl_load.py
ADD ./manage.py /app/manage.py
WORKDIR /app
EXPOSE 8000