-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (26 loc) · 1.11 KB
/
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
38
39
FROM python:3.9
EXPOSE 8080
ARG PELOTON_USERNAME
ARG PELOTON_PASSWORD
ENV PELOTON_USERNAME=$PELOTON_USERNAME
ENV PELOTON_PASSWORD=$PELOTON_PASSWORD
WORKDIR /app
# Install Google Cloud SDK
RUN apt-get update && apt-get install -y \
curl \
gnupg \
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - \
&& echo "deb https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
&& apt-get update && apt-get install -y google-cloud-sdk
# Install application dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt
# Copy application files
COPY . .
# Set Google Cloud credentials environment variable
ENV GOOGLE_APPLICATION_CREDENTIALS="/app/keyfile.json"
CMD ["streamlit", "run", "main.py", "--server.port=8080", "--server.address=0.0.0.0"]
# ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8080", "--server.address=0.0.0.0"]
# fyi local cmds:
# docker build --build-arg PELOTON_USERNAME=<username> --build-arg PELOTON_PASSWORD=<password> -t my_streamlit_app .
# docker run -p 8501:8501 my_streamlit_app