File size: 1,102 Bytes
177c40c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# SolverForge Quickstart Dockerfile
# Compatible with HuggingFace Spaces (Docker SDK)

FROM python:3.12

# Install JDK 21 (required for solverforge-legacy)
RUN apt-get update && \
    apt-get install -y wget gnupg2 && \
    wget -O- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor > /usr/share/keyrings/adoptium-archive-keyring.gpg && \
    echo "deb [signed-by=/usr/share/keyrings/adoptium-archive-keyring.gpg] https://packages.adoptium.net/artifactory/deb bookworm main" > /etc/apt/sources.list.d/adoptium.list && \
    apt-get update && \
    apt-get install -y temurin-21-jdk && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /app

# Copy application files
COPY . .

# Install the application
RUN pip install --no-cache-dir -e .

# HuggingFace Spaces uses port 7860 by default
# Our app uses 8080 internally, we'll configure uvicorn to use 7860
ENV PORT=7860

# Expose port
EXPOSE 7860

# Run the application (HuggingFace compatible)
CMD ["python", "-m", "uvicorn", "my_quickstart:app", "--host", "0.0.0.0", "--port", "7860"]