forked from opea-project/GenAIComps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (24 loc) · 831 Bytes
/
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
# Copyright (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
# Base image for GenAIComps based OPEA Python applications
# Build: docker build -t opea/comps-base -f Dockerfile .
ARG IMAGE_NAME=python
ARG IMAGE_TAG=3.11-slim
FROM ${IMAGE_NAME}:${IMAGE_TAG} AS base
ENV HOME=/home/user
RUN useradd -m -s /bin/bash user && \
mkdir -p $HOME && \
chown -R user $HOME
# get security updates
RUN apt-get update && apt-get upgrade -y && \
apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
WORKDIR $HOME
COPY *.toml *.py *.txt *.md LICENSE ./
RUN pip install --no-cache-dir --upgrade pip setuptools && \
pip install --no-cache-dir -r requirements.txt
COPY comps/ comps/
ENV PYTHONPATH=$PYTHONPATH:$HOME
USER user
ENTRYPOINT ["sh", "-c", "set && ls -la"]