Gleb Gleb
jvm
66ecc97
raw
history blame
868 Bytes
# Use Python 3.11 slim image
FROM python:3.11-slim
# Set environment variables for Java and cache directory
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
ENV XDG_CACHE_HOME=/tmp/.cache
ENV PATH="${JAVA_HOME}/bin:${PATH}"
# Set working directory
WORKDIR /app
# Install system dependencies: Java and build tools
RUN apt-get update && apt-get install -y --no-install-recommends \
openjdk-11-jdk \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy your app code (app.py etc.)
COPY . .
# Upgrade pip
RUN pip install --upgrade pip
# Install the impresso-pipelines package from PyPI with extras
RUN pip install "impresso_pipelines[solrnormalization]==0.4.6.4"
# Install Gradio separately if it's not in your package's dependencies
RUN pip install gradio
# Expose Gradio default port
EXPOSE 7860
# Run the app
CMD ["python", "app.py"]