macavaney commited on
Commit
722cbb9
·
verified ·
1 Parent(s): 3160608

Create dockerfile

Browse files
Files changed (1) hide show
  1. dockerfile +42 -0
dockerfile ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Base image
2
+ FROM python:3.11-slim
3
+
4
+ # Avoid interactive prompts
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+ # System deps (for building Python + Rust crates)
8
+ RUN apt-get update && apt-get install -y \
9
+ curl \
10
+ build-essential \
11
+ default-jre \
12
+ default-jre-headless \
13
+ default-jdk \
14
+ default-jdk-headless \
15
+ debianutils \
16
+ git \
17
+ && rm -rf /var/lib/apt/lists/*
18
+
19
+ # Install Rust (latest stable via rustup)
20
+ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
21
+ ENV PATH="/root/.cargo/bin:${PATH}"
22
+
23
+ # Verify versions (optional but useful for logs)
24
+ RUN rustc --version && cargo --version
25
+
26
+ # Set workdir
27
+ WORKDIR /app
28
+
29
+ # Copy dependency files first (for caching)
30
+ COPY requirements.txt .
31
+
32
+ # Install Python deps
33
+ RUN pip install --no-cache-dir -r requirements.txt
34
+
35
+ # Copy the rest of the app
36
+ COPY . .
37
+
38
+ # Expose port (HF expects 7860)
39
+ EXPOSE 7860
40
+
41
+ # Run the app
42
+ CMD ["python", "app.py"]