abubasith86 commited on
Commit
f333fb0
·
verified ·
1 Parent(s): bc0eda6

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Use non-root user
4
+ RUN useradd -m -u 1000 user
5
+ USER user
6
+ ENV HOME=/home/user
7
+ WORKDIR $HOME/app
8
+
9
+ # Get git and pip
10
+ RUN apt-get update && apt-get install -y git && \
11
+ pip install --no-cache-dir --upgrade pip
12
+
13
+ # Clone your repo
14
+ ARG GH_REPO_URL
15
+ ARG GH_BRANCH=main
16
+ RUN git clone --depth 1 --branch main https://github.com/abubasith456/chat-bot-backend.git .
17
+
18
+ # Install Python dependencies
19
+ COPY --chown=user requirements.txt .
20
+ RUN pip install --no-cache-dir -r requirements.txt
21
+
22
+ # Expose default HF port
23
+ EXPOSE 7860
24
+
25
+ # Start your app
26
+ CMD ["python", "main.py"]