Spaces:
Runtime error
Runtime error
FROM python:3.10 | |
# python | |
ENV PYTHONUNBUFFERED=1 \ | |
# prevents python creating .pyc files | |
PYTHONDONTWRITEBYTECODE=1 \ | |
\ | |
# pip | |
PIP_NO_CACHE_DIR=off \ | |
PIP_DISABLE_PIP_VERSION_CHECK=on \ | |
PIP_DEFAULT_TIMEOUT=100 \ | |
\ | |
# poetry | |
# https://python-poetry.org/docs/configuration/#using-environment-variables | |
POETRY_VERSION=1.3.2 \ | |
# make poetry install to this location | |
POETRY_HOME="/opt/poetry" \ | |
# make poetry create the virtual environment in the project's root | |
# it gets named `.venv` | |
POETRY_VIRTUALENVS_IN_PROJECT=false \ | |
# do not ask any interactive question | |
POETRY_NO_INTERACTION=1 \ | |
POETRY_VIRTUALENVS_CREATE=false | |
ENV VENV_PATH="/venv" | |
ENV PATH="$VENV_PATH/bin:$PATH" | |
WORKDIR /app | |
RUN apt-get update | |
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y | |
ENV PATH="/root/.cargo/bin:${PATH}" | |
RUN rustc --version | |
RUN pip install wheel | |
RUN apt-get update && apt-get upgrade -y && apt-get install netcat-traditional -y && apt-get install wkhtmltopdf -y | |
RUN pip install --upgrade poetry | |
RUN python -m venv /venv | |
RUN /venv/bin/pip install --upgrade pip wheel setuptools setuptools_rust | |
COPY . . | |
RUN mkdir flagged | |
RUN mkdir gradio_cached_examples | |
RUN poetry install | |
COPY . . | |
CMD ["uvicorn", "claude_space.app:gd", "--host", "0.0.0.0", "--port", "7860"] | |