muddasser commited on
Commit
b41448d
·
verified ·
1 Parent(s): f183129

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -24
Dockerfile CHANGED
@@ -1,25 +1,31 @@
1
- FROM python:3.12-slim
2
-
3
- ENV DEBIAN_FRONTEND=noninteractive
4
-
5
- # Install essential packages
6
- RUN apt-get update && apt-get install -y \
7
- build-essential \
8
- libpq-dev \
9
- && rm -rf /var/lib/apt/lists/*
10
-
11
- # Set working directory
12
- WORKDIR /home/user/app
13
-
14
- # Copy your code
15
- COPY . .
16
-
17
- # Install Python dependencies
18
- RUN pip install --no-cache-dir --upgrade pip
19
- RUN pip install --no-cache-dir -r requirements.txt
20
-
21
- # Expose port for Streamlit
22
- EXPOSE 8501
23
-
24
- # Run app
 
 
 
 
 
 
25
  CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
1
+ FROM python:3.12-slim
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
+
5
+ # Create /data/resumes and set permissions
6
+ RUN mkdir -p /data/resumes && \
7
+ chown -R 1000:1000 /data && \
8
+ chmod -R 775 /data
9
+
10
+ # Install essential packages
11
+ RUN apt-get update && apt-get install -y \
12
+ build-essential \
13
+ libpq-dev \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Set working directory
17
+ WORKDIR /home/user/app
18
+
19
+ # Copy your code
20
+ COPY . .
21
+
22
+ # Install Python dependencies
23
+ RUN pip install --no-cache-dir --upgrade pip
24
+ RUN pip install --no-cache-dir -r requirements.txt
25
+
26
+ # Expose port for Streamlit
27
+ EXPOSE 8501
28
+
29
+ # Run app as user 1000
30
+ USER 1000
31
  CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]