0xarchit commited on
Commit
4271032
·
1 Parent(s): bcd59c6

added docker file for backend deploy

Browse files
Files changed (3) hide show
  1. .dockerignore +23 -0
  2. Dockerfile +28 -0
  3. static/temp/.gitkeep +0 -0
.dockerignore ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .git
2
+ .github
3
+ .venv
4
+ .env
5
+ __pycache__
6
+ *.pyc
7
+ *.pyo
8
+ *.pyd
9
+ .Python
10
+ *.so
11
+ *.egg
12
+ *.egg-info
13
+ dist
14
+ build
15
+ .vscode
16
+ .idea
17
+ *.log
18
+ .DS_Store
19
+ Thumbs.db
20
+ node_modules
21
+ Frontend
22
+ User
23
+ noupload
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ RUN apt-get update && apt-get install -y \
6
+ libgl1 \
7
+ libglib2.0-0 \
8
+ libsm6 \
9
+ libxext6 \
10
+ libxrender-dev \
11
+ libgomp1 \
12
+ git \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ COPY Backend/requirements.txt /app/Backend/requirements.txt
16
+ RUN pip install --no-cache-dir -r /app/Backend/requirements.txt
17
+
18
+ COPY Backend/ /app/Backend/
19
+ COPY static/ /app/static/
20
+
21
+ RUN mkdir -p /app/static/temp
22
+
23
+ ENV PYTHONPATH=/app
24
+ ENV PYTHONUNBUFFERED=1
25
+
26
+ EXPOSE 7860
27
+
28
+ CMD ["python", "-m", "uvicorn", "Backend.api:app", "--host", "0.0.0.0", "--port", "7860", "--forwarded-allow-ips", "*"]
static/temp/.gitkeep ADDED
File without changes