forked from OwenPendrighElliott/ingrain_server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (25 loc) · 912 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
# ARG to specify the base image
ARG BASE_IMAGE=owenpelliott/ingrain-base:amd64
# Use the base image specified in the build argument
FROM ${BASE_IMAGE}
# Install the required packages
RUN apt-get update && apt-get install -y python3-pip python3-venv supervisor
# Set the working directory
WORKDIR /app
# Copy only requirements.txt first to take advantage of Docker's cache
COPY requirements.txt /app
# Install Python dependencies
RUN pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code into the container
COPY . /app
# Expose the required ports
EXPOSE 8686
EXPOSE 8687
# Create the model repository directory
RUN mkdir -p /app/model_repository
# Ensure the inference server run script is executable
RUN chmod +x /app/start.sh
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Start the app
CMD ["bash", "/app/start.sh"]