-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (29 loc) · 962 Bytes
/
Dockerfile
File metadata and controls
40 lines (29 loc) · 962 Bytes
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
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_NO_CACHE_DIR=1 \
MOTO_GENERIC_MODE=true \
HOST=0.0.0.0 \
PORT=8000 \
MOTO_DATA_ROOT=/app/backend/data
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends libgomp1 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt requirements-generic.txt ./
RUN pip install --upgrade pip \
&& pip install -r requirements-generic.txt
COPY package.json moto-update-manifest.json ./
COPY backend ./backend
COPY docker ./docker
RUN sed -i 's/\r$//' /app/docker/entrypoint.sh \
&& chmod +x /app/docker/entrypoint.sh \
&& mkdir -p /app/backend/data \
&& python - <<'PY'
from fastembed import TextEmbedding
from backend.shared.fastembed_provider import FASTEMBED_MODEL_NAME
TextEmbedding(model_name=FASTEMBED_MODEL_NAME)
PY
EXPOSE 8000
ENTRYPOINT ["/app/docker/entrypoint.sh"]