File size: 676 Bytes
1621405 46cf5ec 7c07f14 1621405 46cf5ec 1621405 46cf5ec 1621405 5d3395a 1621405 46cf5ec 1621405 46cf5ec 1621405 |
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 a base image with Python
FROM python:3.9
# Install Java (required for language-tool-python)
RUN apt-get update && apt-get install -y openjdk-11-jdk
# Set JAVA_HOME environment variable
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
ENV PATH=$JAVA_HOME/bin:$PATH
# Create a non-root user
RUN useradd -m -u 1000 user
USER user
# Set the working directory
WORKDIR /app
# Copy the requirements.txt file and install dependencies
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the entire application code
COPY --chown=user . .
# Command to run the app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|