Skip to content

Commit bb48371

Browse files
Skyler HartleSkyler Hartle
authored andcommitted
first commit
0 parents  commit bb48371

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+

app.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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+

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
streamlit

0 commit comments

Comments
 (0)