Jaita commited on
Commit
0ef51b1
·
verified ·
1 Parent(s): e56e601

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11
2
+
3
+ # Inside the container, we'll work from /app. This is just a path.
4
+ WORKDIR /app
5
+
6
+ # Install dependencies first (better layer caching)
7
+ COPY requirements.txt .
8
+ RUN pip install --no-cache-dir -r requirements.txt
9
+
10
+ # Copy your source files
11
+ COPY . .
12
+
13
+ # Helpful envs
14
+ ENV PYTHONUNBUFFERED=1 \
15
+ PYTHONDONTWRITEBYTECODE=1
16
+
17
+ #RUN mkdir -p /data && chmod -R 777 /data
18
+
19
+ # Expose your port (change if you prefer 8000)
20
+ EXPOSE 7860
21
+
22
+ # Run Uvicorn pointing to your ASGI app in main.py
23
+ # Using `python -m uvicorn` is more reliable in containers
24
+ CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]