Spaces:
Build error
Build error
FROM python:3.10.10 | |
# Set the working directory to /code | |
WORKDIR /code | |
# Copy Pipfile | |
COPY Pipfile Pipfile.lock ./ | |
# Python PIP Upgrade & Install Dependencies | |
RUN pip install --no-cache-dir pipenv | |
# Install Python Dependencies | |
RUN pipenv install -d | |
# Set up a new user named "user" with user ID 1000 | |
RUN useradd -m -u 1000 alaye | |
# Switch to the "alaye" user | |
USER alaye | |
# Set home to the alaye's home directory | |
ENV HOME=/home/alaye \ | |
PATH=/home/alaye/.local/bin:$PATH \ | |
PYTHONPATH=$HOME/alaroye \ | |
PYTHONUNBUFFERED=1 \ | |
PYTHONDONTWRITEBYTECODE=1 \ | |
GRADIO_ALLOW_FLAGGING=never \ | |
GRADIO_NUM_PORTS=1 \ | |
GRADIO_SERVER_NAME=0.0.0.0 \ | |
GRADIO_THEME=huggingface \ | |
SYSTEM=spaces | |
# Set the working directory to the user's home directory | |
WORKDIR $HOME/alaroye | |
# Copy Project | |
COPY --chown=alaye . $HOME/alaroye | |
# Expose Port | |
EXPOSE 7860 | |
# Run entrypoint | |
ENTRYPOINT [ "python" "-m", "pipenv", "run" ] | |
# Run the web service on container startup. | |
CMD [ "python", "src/web.py"] | |