Skip to content

Commit 12efd87

Browse files
committed
dockerfiles
1 parent e197312 commit 12efd87

8 files changed

Lines changed: 121 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM python:3.12-slim-bookworm
2+
3+
WORKDIR /srv
4+
5+
# Install base requirements first
6+
RUN pip install chainlit --no-cache-dir
7+
8+
# Copy only the requirements
9+
COPY requirements.txt /srv/
10+
11+
# Install Python dependencies
12+
RUN pip install -r requirements.txt --no-cache-dir
13+
14+
# CMD to run the Chainlit app
15+
CMD ["chainlit", "run", "/srv/app.py", "--host=0.0.0.0", "--port=80", "--headless"]

cloud-dockerfiles/dash/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:3.12-slim-bookworm
2+
3+
WORKDIR /srv
4+
5+
# Install Dash and Gunicorn
6+
RUN pip install dash gunicorn --no-cache-dir
7+
8+
9+
COPY requirements.txt /srv/
10+
11+
# Install Python dependencies
12+
RUN pip install -r requirements.txt --no-cache-dir
13+
14+
CMD ["gunicorn", "-b", "0.0.0.0:80", "app:server"]

cloud-dockerfiles/flask/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:3.12-slim-bookworm
2+
3+
WORKDIR /srv
4+
5+
# Install Flask & Gunicorn
6+
RUN pip install flask gunicorn --no-cache-dir
7+
8+
COPY requirements.txt /srv/
9+
10+
# Install Python dependencies
11+
RUN pip install -r requirements.txt --no-cache-dir
12+
13+
# CMD to run the Flask app with Gunicorn
14+
CMD ["gunicorn", "-b", "0.0.0.0:80", "app:app"]

cloud-dockerfiles/panel/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM python:3.12-slim-bookworm
2+
3+
WORKDIR /srv
4+
5+
# Install Panel
6+
RUN pip install panel --no-cache-dir
7+
8+
9+
COPY requirements.txt /srv/
10+
11+
# Install Python dependencies
12+
RUN pip install -r requirements.txt --no-cache-dir
13+
14+
# CMD to run the Panel app
15+
CMD ["panel", "serve", "app.py", "--port=80", "--address=0.0.0.0", "--allow-websocket-origin=*"]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM rocker/shiny:4.3.3
2+
3+
WORKDIR /srv
4+
5+
COPY install.R /srv/
6+
RUN Rscript install.R
7+
8+
COPY . /srv
9+
10+
ENTRYPOINT ["Rscript", "startApp.R"]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:3.12-slim-bookworm
2+
3+
WORKDIR /srv
4+
5+
RUN pip install solara --no-cache-dir
6+
7+
COPY requirements.txt /srv/
8+
9+
# Install Python dependencies
10+
RUN pip install -r requirements.txt --no-cache-dir
11+
12+
13+
# CMD to run the Solara app from /srv/app
14+
CMD ["solara", "run", "/srv/app.py", "--port=80", "--host=0.0.0.0", "--production"]
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM python:3.12-slim-bookworm
2+
3+
WORKDIR /srv
4+
5+
# Install base requirements first
6+
RUN pip install streamlit --no-cache-dir
7+
8+
COPY requirements.txt /srv/
9+
10+
11+
# Install Python dependencies
12+
RUN pip install -r requirements.txt --no-cache-dir
13+
14+
15+
# CMD to run the Streamlit app
16+
CMD ["streamlit", "run", "/srv/app.py", \
17+
"--server.port=80", \
18+
"--server.headless=true", \
19+
"--server.address=0.0.0.0", \
20+
"--browser.gatherUsageStats=false", \
21+
"--server.enableStaticServing=true", \
22+
"--server.fileWatcherType=none", \
23+
"--client.toolbarMode=viewer"]

cloud-dockerfiles/voila/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM python:3.12-slim-bookworm
2+
3+
# Install necessary dependencies for Voila
4+
RUN pip install voila ipywidgets ipykernel --no-cache-dir
5+
6+
WORKDIR /srv
7+
8+
# Copy the requirements.txt to install Python dependencies
9+
COPY requirements.txt /srv/
10+
RUN pip install -r requirements.txt --no-cache-dir
11+
12+
# Copy the application and other necessary files
13+
COPY . /srv/
14+
15+
# CMD to run the Voila app
16+
CMD ["voila", "--port=80", "--no-browser", "app.ipynb", "--Voila.ip='0.0.0.0'"]

0 commit comments

Comments
 (0)