alaroye / Dockerfile
abdulazeezoj's picture
update dependencies
2b6f022
raw
history blame
997 Bytes
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 --upgrade pip \
&& pip install --no-cache-dir pipenv
# Install Python Dependencies
RUN pipenv install --system --deploy --ignore-pipfile
# 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
CMD [ "python", "src/web.py"]