sniro23 commited on
Commit
8ee9911
·
1 Parent(s): fda9016

fix: Remove Dockerfile to use Gradio SDK on HF Spaces

Browse files
Files changed (1) hide show
  1. Dockerfile +0 -35
Dockerfile DELETED
@@ -1,35 +0,0 @@
1
- FROM python:3.10-slim
2
-
3
- # Set environment variables, pointing cache to a writable directory inside /app
4
- ENV PYTHONUNBUFFERED=1 \
5
- DEBIAN_FRONTEND=noninteractive \
6
- TZ=UTC \
7
- HF_HOME=/app/data/.huggingface
8
-
9
- # Create a non-root user and grant permissions
10
- RUN useradd -m -u 1000 user
11
-
12
- # Create and set working directory
13
- WORKDIR /app
14
-
15
- # Create a writable directory for cache and give ownership to the user
16
- RUN mkdir -p /app/data && chown -R user:user /app/data
17
-
18
- # Copy requirements first to leverage Docker cache
19
- COPY --chown=user:user requirements.txt .
20
-
21
- # Switch to the non-root user before installing dependencies
22
- USER user
23
-
24
- # Install Python dependencies
25
- RUN pip install --no-cache-dir -r requirements.txt
26
-
27
- # Copy the rest of the application source code as the user
28
- COPY --chown=user:user ./src ./src
29
- COPY --chown=user:user ./app.py ./app.py
30
-
31
- # Expose the port the app runs on
32
- EXPOSE 7860
33
-
34
- # Set the command to run the application
35
- CMD ["python", "app.py"]