-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (30 loc) · 937 Bytes
/
Copy pathDockerfile
File metadata and controls
40 lines (30 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM python:3.10-slim as build
# Install basic packages
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libgl1 \
libglib2.0-0 \
ffmpeg \
curl \
cron \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js (current LTS version) and npm
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y nodejs
# Set working dir
WORKDIR /usr/src/app
# Install Python deps...
COPY requirements.txt /requirements.txt
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
RUN pip install --no-cache-dir -r /requirements.txt
COPY . /usr/src/app/
WORKDIR /usr/src/app/frontend-vue
COPY frontend-vue/package*.json ./
RUN npm install
RUN npm install -g vite --save-dev
COPY frontend-vue .
RUN npm run build
WORKDIR /usr/src/app
EXPOSE 5000
ENV EASYOCR_MODULE_PATH=/data/easyocr-models
CMD ["python", "server.py"]