File size: 937 Bytes
263006a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
37
38
39
40
41
42
43
44
45
46
# Base image
FROM python:3.10-slim

# Avoid interactive prompts
ENV DEBIAN_FRONTEND=noninteractive

# System deps (for building Python + Rust crates)
RUN apt-get update && apt-get install -y \
    curl \
    build-essential \
    default-jre \
    default-jre-headless \
    default-jdk \
    default-jdk-headless \
    debianutils \
    git \
    openssl \
    libssl-dev \
    pkg-config \
    && rm -rf /var/lib/apt/lists/*

# Install Rust (latest stable via rustup)
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Verify versions (optional but useful for logs)
RUN rustc --version && cargo --version

# Set workdir
WORKDIR /app

# Copy dependency files first (for caching)
COPY requirements.txt .

# Install Python deps
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the app
COPY . .

# Expose port (HF expects 7860)
EXPOSE 7860

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