File size: 1,119 Bytes
dd8c580
 
 
 
0e95319
dd8c580
0e95319
 
dd8c580
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Use an official Python runtime as a parent image
FROM python:3.9.13

# Set the working directory to /appchecker
WORKDIR /checkerpyresearch

# Copy the current directory contents into the container at /checkerpyresearch
COPY . /checkerpyresearch

# Upgrade pip
RUN pip install --upgrade pip

# Install system dependencies
RUN apt-get update && apt-get install -y \
    tesseract-ocr \
    tesseract-ocr-eng

# Install Python dependencies
RUN pip install -r requirements.txt

# Install the Hugging Face Transformers library
RUN pip install transformers

# Download and cache the Hugging Face model (replace 'your_model_name' with the actual model name)
RUN python -c "from transformers import AutoModelForTextClassification, AutoTokenizer; AutoModelForTextClassification.from_pretrained('your_model_name'); AutoTokenizer.from_pretrained('your_model_name')"

# Add Tesseract to PATH
ENV PATH="/usr/bin/tesseract:${PATH}"

# Make port 8501 available to the world outside this container
EXPOSE 8501

# Define environment variable
ENV NAME World

# Run app.py when the container launches
CMD ["streamlit", "run", "app.py"]