-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
dev.Dockerfile
36 lines (26 loc) · 1.09 KB
/
dev.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
36
# Use the official Python image as the base image
FROM python:3.11-slim-buster
# Install python3.11
RUN apt update && apt install -y python3.11
# Install pip
RUN apt -y install python3-pip
# Set the working directory to /app
WORKDIR /app
# Copy the working directory contents into the container at /app
COPY . .
# Upgrade pip and setuptools
RUN pip install --upgrade pip setuptools
# Install Rust
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y curl build-essential && \
curl https://sh.rustup.rs -sSf | sh -s -- -y
# Make sure Rust is in the PATH
ENV PATH="/root/.cargo/bin:${PATH}"
# Install any needed packages specified in pyproject.toml
RUN sed -i 's/dynamic = \["version"\]/version = "0.0.0"/' pyproject.toml && \
pip install --no-cache-dir .
# Make port 8488 available to the world outside this container
EXPOSE 8488
# Run the gunicorn server with the FastAPI app
ENTRYPOINT ["gunicorn", "--bind", "0.0.0.0:8488", "src.flint.main:app", "--workers", "2", "-k", "uvicorn.workers.UvicornWorker", "--timeout", "600", "--keep-alive", "120", "--log-level", "debug"]