Spaces:
Sleeping
Sleeping
File size: 856 Bytes
3a21152 893c49c 3a21152 866e78e 893c49c 721d470 3735292 8d5ed12 721d470 3735292 721d470 344faaf 893c49c 344faaf 3a21152 |
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 |
FROM python:3.10-slim
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_VERSION=1.8.3
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
COPY . $HOME/app
WORKDIR $HOME/app
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
RUN pip install "poetry==$POETRY_VERSION" && \
poetry export --without-hashes --format requirements.txt --output $HOME/requirements.txt && \
python3 -m pip wheel --no-cache-dir --no-deps -w $HOME/app/wheels -r $HOME/requirements.txt
RUN python3 -m pip install --no-cache $HOME/app/wheels/*
EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"
ENTRYPOINT ["poetry", "run", "python3", "main.py", "interface"] |