CoolFace
Apppublic

Abs6187/ISL_Sign_Language_Translation

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
Dockerfile40 linesDownload Raw Back to root
1FROM python:3.11-slim
2
3WORKDIR /app
4
5# Install system dependencies
6RUN apt-get update && apt-get install -y \
7    build-essential \
8    curl \
9    git \
10    ffmpeg \
11    libglib2.0-0 \
12    && rm -rf /var/lib/apt/lists/*
13
14# Copy requirements first for better caching
15COPY requirements.txt .
16
17# Install PyTorch CPU version first
18RUN pip install --no-cache-dir torch==2.0.1+cpu --index-url https://download.pytorch.org/whl/cpu
19
20# Install other Python dependencies
21RUN pip install --no-cache-dir -r requirements.txt
22
23# Copy application code
24COPY . .
25
26# Set environment variables
27ENV PYTHONUNBUFFERED=1
28ENV STREAMLIT_SERVER_HEADLESS=true
29ENV STREAMLIT_SERVER_ENABLE_CORS=false
30ENV STREAMLIT_SERVER_PORT=8501
31ENV HF_HOME=/tmp/huggingface
32ENV TRANSFORMERS_CACHE=/tmp/transformers
33ENV KERAS_BACKEND=tensorflow
34
35# Expose port
36EXPOSE 8501
37
38# Run the app
39CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
40