File size: 811 Bytes
66ecc97
b42f9b9
42c4e1a
66ecc97
cddda61
66ecc97
 
 
 
42c4e1a
 
cddda61
66ecc97
cddda61
66ecc97
 
 
 
cddda61
d586606
 
66ecc97
 
 
cddda61
66ecc97
 
cddda61
66ecc97
 
 
 
42c4e1a
66ecc97
 
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 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-17-openjdk-amd64
ENV XDG_CACHE_HOME=/tmp/.cache
ENV PATH="${JAVA_HOME}/bin:${PATH}"

# Set working directory
WORKDIR /app

# Install Java 17 and build tools
RUN apt-get update && apt-get install -y --no-install-recommends \
    openjdk-17-jdk \
    build-essential \
    curl \
    && rm -rf /var/lib/apt/lists/*

# Copy app code (app.py etc.)
COPY . .

# Upgrade pip
RUN pip install --upgrade pip

# Install your PyPI package with solrnormalization extras
RUN pip install "impresso_pipelines[solrnormalization]==0.4.6.4"

# Install gradio if not already pulled in
RUN pip install gradio

# Expose Gradio default port
EXPOSE 7860

# Run the app
CMD ["python", "app.py"]