-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
37 lines (28 loc) · 947 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM python:3.9-slim
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_DEFAULT_TIMEOUT=120 \
LC_ALL=C.UTF-8 \
LANG=C.UTF-8
# we probably need build tools?
RUN apt-get update \
&& apt-get install --yes --no-install-recommends \
gcc \
g++ \
build-essential \
python3-dev
WORKDIR /app
COPY requirements.txt requirements.txt
# if we have a packages.txt, install it
COPY packages.txt packages.txt
RUN xargs -a packages.txt apt-get install --yes
RUN pip install --no-cache-dir --upgrade -r requirements.txt
EXPOSE 8501
COPY . .
CMD ["streamlit", "run", "app.py"]
# docker build --progress=plain --tag demo_site:latest .
# docker run -ti -p 8501:8501 --rm demo_site:latest /bin/bash
# docker run -ti -p 8501:8501 --rm demo_site:latest
# docker run -ti -p 8501:8501 -v ${pwd}:/app --rm demo_site:latest