Amogh1221 commited on
Commit
fa101a1
·
verified ·
1 Parent(s): 63623c9

Delete Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +0 -29
Dockerfile DELETED
@@ -1,29 +0,0 @@
1
- # Use a lightweight Python 3.11 base image
2
- FROM python:3.11-slim
3
-
4
- # Set environment variables
5
- ENV PYTHONUNBUFFERED=1 \
6
- PYTHONDONTWRITEBYTECODE=1 \
7
- HF_HOME=/tmp/hf_home
8
-
9
- # Create a non-root user (Hugging Face requirement)
10
- RUN useradd -m -u 1000 user
11
- USER user
12
- ENV PATH="/home/user/.local/bin:$PATH"
13
-
14
- # Set working directory
15
- WORKDIR /app
16
-
17
- # Install dependencies first (to leverage Docker caching)
18
- COPY --chown=user:user Requirements.txt /app/
19
- RUN pip install --no-cache-dir --upgrade pip && \
20
- pip install --no-cache-dir -r Requirements.txt
21
-
22
- # Copy the rest of the application code
23
- COPY --chown=user:user . /app/
24
-
25
- # Expose port 7860 (Hugging Face requirement)
26
- EXPOSE 7860
27
-
28
- # Start the FastAPI application with multiple workers for production
29
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "2"]