rbiswasfc's picture
app
d1c7f60
raw
history blame contribute delete
No virus
707 Bytes
FROM python:3.10
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set the working directory
WORKDIR $HOME/app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN git config --global credential.helper store
COPY . .
COPY supervisord.conf .
# Set permissions on the log file
USER root
RUN touch $HOME/app/mylog.log $HOME/app/supervisord.log && chmod a+rwx $HOME/app/mylog.log $HOME/app/supervisord.log
RUN mkdir -p /tmp/cache/
RUN mkdir -p /.cache
RUN chmod a+rwx -R /tmp/cache/
RUN chmod a+rwx -R /.cache
ENV HF_HUB_CACHE=HF_HOME
ENV PYTHONUNBUFFERED=1 PORT=7860
# Run supervisord
CMD ["supervisord", "-c", "supervisord.conf"]