-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (18 loc) · 633 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
# Use the official Python image as the base image
FROM python:3.10
# Set the working directory
WORKDIR /app
# Copy requirements file and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
# Expose the port that the app runs on
EXPOSE 8000
# Install ploomber
RUN pip install ploomber
# Remove files ending in .metadata from the notebooks folder
RUN find notebooks -type f -name "*.metadata" -exec rm -f {} \;
RUN ploomber build
# Execute the script when the container starts
CMD ["uvicorn", "src.app.app:app", "--host", "0.0.0.0"]