Download Dockerfile from ojaskittur/speech-transcript-evaluation-system: direct link, hf CLI and curl.
- Browser
- Download file 889 Bytes
-
https://huggingface.co/spaces/ojaskittur/speech-transcript-evaluation-system/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ojaskittur/speech-transcript-evaluation-system/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ojaskittur/speech-transcript-evaluation-system/resolve/main/Dockerfile
889 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # 1. Install System Dependencies | |
| # default-jdk-headless ensures we get a compatible Java version (likely 17 or 21) | |
| RUN apt-get update && \ | |
| apt-get install -y default-jdk-headless build-essential git && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # 2. Copy files | |
| COPY . . | |
| # 3. Install Python libraries | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # 4. Create User (Fixed for 'dash' shell) | |
| # Changed '&>/dev/null' to '>/dev/null 2>&1' to match the system shell | |
| RUN id -u user >/dev/null 2>&1 || useradd -m -u 1000 user | |
| # 5. Fix Permissions | |
| RUN chown -R user:user /app && \ | |
| chown -R user:user /home/user | |
| # 6. Switch User | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| # 7. Run | |
| EXPOSE 7860 | |
| CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"] |