Spaces:
Runtime error
Runtime error
File size: 762 Bytes
7d82335 3345f61 cb2f301 7688491 cb2f301 7d82335 4c907cc 7d82335 86c99d6 7d82335 7688491 964a3b7 cb2f301 86c99d6 |
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 |
# Use the official Python image as the base image
FROM python:3.10
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
COPY ./requirements.txt ~/app/requirements.txt
# Copy the poetry files
COPY pyproject.toml poetry.lock /app/
# Install poetry
RUN pip install poetry
RUN pip install torch==1.10.0+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
# Set environment variable to create virtualenv within the project directory
ENV POETRY_VIRTUALENVS_IN_PROJECT=true
# Install project dependencies
RUN poetry lock
RUN poetry install
# Copy the rest of the application code
COPY . .
CMD ["poetry", "run", "chainlit", "run", "app.py", "--port", "7860"]
|