File size: 520 Bytes
5c93d70
 
04bef66
 
 
 
5c93d70
 
 
 
 
04bef66
5c93d70
04bef66
 
 
5c93d70
 
 
04bef66
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM python:3.11-slim

# Install Poetry
RUN pip install poetry==1.7.1
RUN poetry config virtualenvs.create false

ARG GRADIO_SERVER_PORT=7860
ENV GRADIO_SERVER_PORT=${GRADIO_SERVER_PORT}

WORKDIR /app

COPY ./pyproject.toml ./poetry.lock* /app/

# Allow installing dev dependencies to run tests
ARG INSTALL_DEV=true
RUN bash -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --no-dev ; fi"

COPY app.py /app/

CMD ["python", "/app/app.py"]
# CMD ["gradio", "/app/app.py"]