Adisri99 commited on
Commit
b5b6255
·
verified ·
1 Parent(s): b30fd30

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -24
Dockerfile CHANGED
@@ -1,30 +1,25 @@
1
- FROM node:20-bookworm AS frontend-builder
2
- WORKDIR /workspace/frontend
3
- COPY frontend/package*.json ./
4
- RUN npm install
5
- COPY frontend/ ./
6
- ENV NEXT_TELEMETRY_DISABLED=1
7
- RUN npm run build
8
-
9
  FROM python:3.11-slim
10
- ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PORT=7860
 
 
 
 
11
  WORKDIR /workspace
12
- RUN apt-get update && apt-get install -y --no-install-recommends nginx curl build-essential && rm -rf /var/lib/apt/lists/*
13
- COPY backend/requirements.txt /workspace/backend/requirements.txt
14
- RUN pip install --no-cache-dir -r /workspace/backend/requirements.txt
 
 
 
 
 
 
15
  COPY backend /workspace/backend
16
  COPY scripts /workspace/scripts
17
  COPY data_samples /workspace/data_samples
18
- COPY space/nginx.conf /etc/nginx/nginx.conf
19
- COPY space/start.sh /workspace/space/start.sh
20
- COPY --from=frontend-builder /workspace/frontend/.next /workspace/frontend/.next
21
- COPY --from=frontend-builder /workspace/frontend/public /workspace/frontend/public
22
- COPY --from=frontend-builder /workspace/frontend/package*.json /workspace/frontend/
23
- COPY --from=frontend-builder /workspace/frontend/next.config.js /workspace/frontend/
24
- COPY --from=frontend-builder /workspace/frontend/app /workspace/frontend/app
25
- COPY --from=frontend-builder /workspace/frontend/components /workspace/frontend/components
26
- COPY --from=frontend-builder /workspace/frontend/lib /workspace/frontend/lib
27
- COPY --from=frontend-builder /workspace/frontend/tsconfig.json /workspace/frontend/tsconfig.json
28
- RUN chmod +x /workspace/space/start.sh && mkdir -p /data/uploads /data/artifacts
29
  EXPOSE 7860
30
- CMD ['/workspace/space/start.sh']
 
 
 
 
 
 
 
 
 
 
1
  FROM python:3.11-slim
2
+
3
+ ENV PYTHONDONTWRITEBYTECODE=1 \
4
+ PYTHONUNBUFFERED=1 \
5
+ PORT=7860
6
+
7
  WORKDIR /workspace
8
+
9
+ RUN apt-get update && apt-get install -y --no-install-recommends \
10
+ build-essential \
11
+ curl \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ COPY backend/requirements.txt /workspace/requirements.txt
15
+ RUN pip install --no-cache-dir -r /workspace/requirements.txt
16
+
17
  COPY backend /workspace/backend
18
  COPY scripts /workspace/scripts
19
  COPY data_samples /workspace/data_samples
20
+
21
+ RUN mkdir -p /data/uploads /data/artifacts
22
+
 
 
 
 
 
 
 
 
23
  EXPOSE 7860
24
+
25
+ CMD ["uvicorn", "backend.app.main:app", "--host", "0.0.0.0", "--port", "7860"]