Sync Model
Browse files- Dockerfile +27 -0
Dockerfile
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use the official Python 3.9 image as the base image
|
2 |
+
FROM python:3.9
|
3 |
+
|
4 |
+
# Set environment variables
|
5 |
+
ENV PROJECT_ROOT /opt/app/
|
6 |
+
ENV ACCEPT_EULA=Y
|
7 |
+
|
8 |
+
# Set the working directory
|
9 |
+
WORKDIR $PROJECT_ROOT
|
10 |
+
|
11 |
+
# Copy only the requirements file to install dependencies
|
12 |
+
COPY requirements.txt /opt/app/
|
13 |
+
|
14 |
+
# Install dependencies
|
15 |
+
RUN pip install --upgrade pip setuptools wheel && \
|
16 |
+
pip install -r requirements.txt
|
17 |
+
|
18 |
+
RUN pip install --upgrade pip
|
19 |
+
RUN apt-get update -y && \
|
20 |
+
apt-get install -y vim curl && \
|
21 |
+
rm -rf var/lib/apt/lists/*
|
22 |
+
|
23 |
+
# Expose the desired port (e.g., 8000 for a FastAPI app)
|
24 |
+
EXPOSE 8001
|
25 |
+
|
26 |
+
# Default command to run the application
|
27 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8001", "n_workers", "4"]
|