File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Use the official lightweight Python image.
2
+ # https://hub.docker.com/_/python
3
+ FROM python:3.9-slim
4
+
5
+ # Set the working directory to /app
6
+ WORKDIR /app
7
+
8
+ # Copy the current directory contents into the container at /app
9
+ COPY . /app
10
+
11
+ # Install any needed packages specified in requirements.txt
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # Make port 8501 available to the world outside this container
15
+ EXPOSE 8501
16
+
17
+ # Define environment variable
18
+ ENV PYTHONUNBUFFERED=1
19
+
20
+ # Run app.py when the container launches
21
+ CMD ["streamlit" , "run" , "app.py" ]
22
+
Original file line number Diff line number Diff line change
1
+ import streamlit as st
2
+
3
+ def main ():
4
+ st .title ("My Streamlit App" )
5
+ st .write ("Hello, world!" )
6
+
7
+ if __name__ == "__main__" :
8
+ main ()
9
+
Original file line number Diff line number Diff line change
1
+ streamlit
You can’t perform that action at this time.
0 commit comments