forked from kubernetes-sigs/gateway-api-inference-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-training
More file actions
27 lines (18 loc) · 730 Bytes
/
Dockerfile-training
File metadata and controls
27 lines (18 loc) · 730 Bytes
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
# Use an official Python runtime as a parent image
FROM python:3.11-slim
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file and install dependencies
# (It's good practice to manage dependencies in a requirements.txt file)
RUN apt-get update && apt-get install -y \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
# Expose the port the app runs on
EXPOSE 8000
# Command to run the application using uvicorn
# We use 0.0.0.0 to bind to all network interfaces inside the container
CMD ["uvicorn", "training_server:app", "--host", "0.0.0.0", "--port", "8000"]