File size: 742 Bytes
873a2fa
7e687c0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a49bdf2
 
7e687c0
a49bdf2
 
fafff37
a49bdf2
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
FROM python:3.12
USER root

WORKDIR /app
RUN rm -f /etc/apt/apt.conf.d/docker-clean \
    && echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache


RUN curl -sSL https://install.python-poetry.org | python3 -

ENV POETRY_HOME="/root/.local"
ENV PATH="$POETRY_HOME/bin:$PATH"
COPY pyproject.toml poetry.lock* /app/

RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi --no-root
# Copy project files

ADD ./app /app/app
COPY main.py /app/main.py
ADD entrypoint.sh /app/
#RUN pip install gunicorn uvicorn

#CMD ["gunicorn", "-w", "3", "-k", "uvicorn.workers.UvicornWorker", "main:app", "--bind", "0.0.0.0:7860"]
RUN chmod +x ./entrypoint.sh

ENTRYPOINT ["./entrypoint.sh"]