afaceuser09 commited on
Commit
218d748
·
verified ·
1 Parent(s): 89a8d9c

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ # Set up system dependencies
4
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
5
+
6
+ # Set up Hugging Face runtime sandbox environment configurations
7
+ RUN useradd -m -u 1000 user
8
+ USER user
9
+ ENV PATH="/home/user/.local/bin:$PATH"
10
+ WORKDIR /app
11
+
12
+ # Copy and install python dependencies
13
+ COPY --chown=user ./requirements.txt requirements.txt
14
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
15
+
16
+ # Copy your application files into place
17
+ COPY --chown=user . /app
18
+
19
+ # Initialize static asset layout directory frameworks
20
+ RUN mkdir -p /app/static
21
+
22
+ # Force port exposition explicitly targeted for Hugging Face standard requirements
23
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]