olamidegoriola pvanand commited on
Commit
2f58a35
1 Parent(s): 7b2f33b

Upload dockerfile and requirements.txt (#5)

Browse files

- Upload dockerfile and requirements.txt (ba94612ff0b3332edd5e8241c62b9c3d458fbc11)


Co-authored-by: Anand <pvanand@users.noreply.huggingface.co>

Files changed (2) hide show
  1. Dockerfile +45 -0
  2. requirements.txt +1 -0
Dockerfile ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1
2
+
3
+ # Comments are provided throughout this file to help you get started.
4
+ # If you need more help, visit the Dockerfile reference guide at
5
+ # https://docs.docker.com/engine/reference/builder/
6
+
7
+ ARG PYTHON_VERSION=3.9
8
+ FROM python:${PYTHON_VERSION}-slim as base
9
+
10
+ RUN apt-get update && apt-get install -y \
11
+ build-essential \
12
+ curl \
13
+ software-properties-common \
14
+ git \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # Copy the requirements file into the container.
18
+ COPY requirements.txt .
19
+
20
+ # Install the dependencies from the requirements file.
21
+ RUN pip3 install --no-cache-dir -r requirements.txt
22
+
23
+ # Prevents Python from writing pyc files.
24
+ ENV PYTHONDONTWRITEBYTECODE=1
25
+
26
+ # Keeps Python from buffering stdout and stderr to avoid situations where
27
+ # the application crashes without emitting any logs due to buffering.
28
+ ENV PYTHONUNBUFFERED=1
29
+
30
+ WORKDIR /app
31
+ # Copy the source code into the container.
32
+ COPY . .
33
+
34
+ # Create a non-privileged user that the app will run under.
35
+ # See https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#user
36
+ # Switch to the non-privileged user to run the application.
37
+ USER 1001
38
+
39
+ # Expose the port that the application listens on.
40
+ EXPOSE 7860
41
+
42
+ HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
43
+
44
+ # set entrypoint for interactive shells
45
+ ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ streamlit