mirror of
https://github.com/hibobmaster/matrix_chatgpt_bot.git
synced 2024-10-01 05:35:36 -04:00
17 lines
565 B
Docker
17 lines
565 B
Docker
FROM python:3.11-alpine as base
|
|
|
|
FROM base as pybuilder
|
|
# RUN sed -i 's|v3\.\d*|edge|' /etc/apk/repositories
|
|
RUN apk update && apk add --no-cache olm-dev gcc musl-dev libmagic libffi-dev cmake make g++ git python3-dev
|
|
COPY requirements.txt /requirements.txt
|
|
RUN pip install -U pip setuptools wheel && pip install --user -r /requirements.txt && rm /requirements.txt
|
|
|
|
FROM base as runner
|
|
RUN apk update && apk add --no-cache olm-dev libmagic libffi-dev
|
|
COPY --from=pybuilder /root/.local /usr/local
|
|
COPY . /app
|
|
|
|
FROM runner
|
|
WORKDIR /app
|
|
CMD ["python", "src/main.py"]
|