Spaces:
Sleeping
Sleeping
File size: 895 Bytes
d526e82 f333fb0 d8ed3c7 ed940fa d8ed3c7 ed940fa d526e82 f333fb0 b09fb7a ed940fa 658944e |
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 33 34 35 36 37 38 39 40 41 42 43 44 |
# FROM python:3.10-slim
# # Install git & pip as root
# USER root
# RUN apt-get update && apt-get install -y git && \
# pip install --no-cache-dir --upgrade pip
# # Create and switch to a non-root user for the app
# RUN useradd -m -u 1000 user
# USER user
# WORKDIR /home/user/app
# # Clone your repo
# ARG GH_REPO_URL
# ARG GH_BRANCH=main
# RUN git clone --depth 1 --branch main https://github.com/abubasith456/chat-bot-backend.git .
# # Install Python dependencies from the cloned repo
# RUN pip install --no-cache-dir -r requirements.txt
# EXPOSE 7860
# CMD ["python", "main.py"]
FROM python:3.10-slim
USER root
RUN apt-get update && apt-get install -y git && \
pip install --no-cache-dir --upgrade pip
RUN useradd -m -u 1000 user
USER user
COPY --chown=user entrypoint.sh /home/user/
RUN chmod +x /home/user/entrypoint.sh
EXPOSE 7860
CMD ["/home/user/entrypoint.sh"]
|