-
Notifications
You must be signed in to change notification settings - Fork 163
/
Dockerfile
37 lines (30 loc) · 1.05 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
FROM python:3.12.6-slim-bookworm
# Update, upgrade and install packages in a single RUN to reduce layers
RUN apt-get update && apt-get install -y \
apt-file \
build-essential \
jq \
libpq-dev \
procps \
python3-dev \
redis-server \
&& apt-file update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Copy application files (see .dockerignore for list of exclusions)
COPY . /app
COPY ./db.sqlite3.dist /app/db.sqlite3
COPY ./.env.docker /app/.env
COPY ./download-nltk-resources.sh /app/
WORKDIR /app
# Optimize pip and Python installations
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt \
&& pip install --no-cache-dir --upgrade grpcio
# Swirl install requirements
RUN python -m spacy download en_core_web_lg && \
./download-nltk-resources.sh
# Install the Galaxy UI
COPY --from=swirlai/spyglass:preview /usr/src/spyglass/ui/dist/spyglass/browser/. /app/swirl/static/galaxy
COPY --from=swirlai/spyglass:preview /usr/src/spyglass/ui/config-swirl-demo.db.json /app/
EXPOSE 8000