jpkarthikeyan commited on
Commit
31ecaee
·
verified ·
1 Parent(s): ebc6cc2

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -11
Dockerfile CHANGED
@@ -1,18 +1,22 @@
1
- FROM python:3.12-slim-bookworm
2
- LABEL authors="karthikeyan"
3
-
4
- RUN apt-get update && apt-get install -y \
5
- build-essential \
6
- && rm -rf /var/lib/apt/lists/*
7
 
8
  WORKDIR /app
9
 
 
 
 
10
  COPY . .
11
 
12
- #COPY requirements.txt .
13
- RUN pip install --no-cache-dir -r requirements.txt
14
- RUN mkdir -p data/TunedDB data/ChromaDB data/FIASS_DB
 
 
 
 
 
15
 
16
- EXPOSE 7860
17
 
18
- CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]
 
1
+ # Example in Dockerfile
2
+ FROM python:3.12-slim
 
 
 
 
3
 
4
  WORKDIR /app
5
 
6
+ COPY requirements.txt .
7
+ RUN pip install -r requirements.txt
8
+
9
  COPY . .
10
 
11
+ # Create a non-root user and give them ownership of /app
12
+ RUN adduser --disabled-password --gecos "" appuser
13
+ RUN chown -R appuser:appuser /app
14
+
15
+ # Switch to the non-root user
16
+ USER appuser
17
+
18
+ CMD ["streamlit", "run", "app.py"]
19
 
20
+ #EXPOSE 7860
21
 
22
+ #CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]