S-Dreamer commited on
Commit
d551567
·
verified ·
1 Parent(s): 66c202a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -0
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1
2
+
3
+ # Official Python 3.11 slim base image
4
+ FROM python:3.11-slim
5
+
6
+ # Metadata
7
+ LABEL maintainer="your-name <your-email>"
8
+ LABEL description="CryptoBERT Gradio Inference App"
9
+
10
+ # Set working directory
11
+ WORKDIR /app
12
+
13
+ # Install system dependencies
14
+ RUN apt-get update && apt-get install -y --no-install-recommends \
15
+ build-essential \
16
+ && rm -rf /var/lib/apt/lists/*
17
+
18
+ # Install Python dependencies
19
+ COPY requirements.txt .
20
+ RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
21
+
22
+ # Copy application files
23
+ COPY . .
24
+
25
+ # Expose Gradio's default port
26
+ EXPOSE 7860
27
+
28
+ # Define environment variable defaults (can override via Docker CLI or Compose)
29
+ ENV HUGGINGFACE_TOKEN=""
30
+
31
+ # Run the Gradio app
32
+ CMD ["python", "app.py"]