Skier8402 commited on
Commit
4d64ea5
1 Parent(s): 5496663

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -0
Dockerfile ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.10.12-slim-buster
3
+
4
+ # Set the working directory in the container to /app
5
+ WORKDIR /app
6
+
7
+ # Add the current directory contents into the container at /app
8
+ ADD . /app
9
+
10
+ # Install any needed debian packages and those specified in requirements.txt
11
+ RUN apt-get update && apt-get install -y \
12
+ build-essential \
13
+ libssl-dev \
14
+ libffi-dev \
15
+ python3-dev \
16
+ git \
17
+ curl \
18
+ unzip \
19
+ && rm -rf /var/lib/apt/lists/* \
20
+ && pip install --no-cache-dir --upgrade pip \
21
+ && pip install --no-cache-dir -r requirements.txt
22
+
23
+ # Make port 8502 available to the world outside this container
24
+ EXPOSE 8504
25
+
26
+ # Add healthcheck
27
+ HEALTHCHECK --interval=5m --timeout=3s \
28
+ CMD curl -f http://localhost:8504/ || exit 1
29
+
30
+
31
+ # Run app.py when the container launches
32
+ ENTRYPOINT [ "streamlit", "run" ]
33
+ CMD [ "PAL.py" ]