NexusV1 commited on
Commit
71cc459
·
verified ·
1 Parent(s): 231f3a5

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +62 -0
Dockerfile ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-bullseye
2
+
3
+ WORKDIR /root
4
+
5
+ RUN apt-get update && apt-get install -y \
6
+ sudo \
7
+ curl \
8
+ unzip \
9
+ build-essential \
10
+ libvips-dev
11
+
12
+ RUN mkdir -p /root/.local /root/.cache/pip
13
+ RUN chmod -R 777 /root
14
+
15
+ ENV PATH="/root/bin:$PATH"
16
+ ENV PYTHONUSERBASE=/root
17
+ ENV PIP_CACHE_DIR=/root/.cache/pip
18
+
19
+ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
20
+ RUN apt-get install -y nodejs
21
+ RUN npm install -g npm@latest
22
+
23
+ RUN rm -f /root/.npmrc
24
+
25
+ RUN mkdir -p /app/home/.npm-global /app/home/.npm /app/home/.npm/.cache
26
+ RUN chmod -R 777 /app/home/.npm-global /app/home/.npm /app/home/.npm/.cache
27
+ RUN chown -R root:root /app/home/.npm-global /app/home/.npm /app/home/.npm/.cache
28
+
29
+ RUN mkdir -p /.npm /.npm/.cache ./npm ./npm/.cache
30
+ RUN chmod -R 777 /.npm /.npm/.cache ./npm ./npm/.cache
31
+ RUN chown -R root:root /.npm /.npm/.cache ./npm ./npm/.cache
32
+
33
+ RUN npm config set cache /app/home/.npm/.cache
34
+ RUN npm config set prefix /app/home/.npm-global
35
+ RUN npm config set globalconfig /app/home/.npmrc
36
+ RUN npm config set userconfig /app/home/.npmrc
37
+
38
+ ENV NPM_CONFIG_PREFIX="/app/home/.npm-global"
39
+ ENV NPM_CONFIG_CACHE="/app/home/.npm/.cache"
40
+
41
+ RUN mkdir -p /app/node_modules /app/home/node_modules
42
+ RUN chmod -R 777 /app/node_modules /app/home/node_modules
43
+ RUN chown -R root:root /app/node_modules /app/home/node_modules
44
+
45
+ # Download and unzip the GitHub repo instead of using git clone
46
+ # Use a clean /build path to extract and copy contents
47
+ RUN mkdir -p /app /build && \
48
+ curl -L -o /tmp/reikerpy.zip https://github.com/ReirLair/reikerpy/archive/refs/heads/main.zip && \
49
+ unzip /tmp/reikerpy.zip -d /build && \
50
+ cp -r /build/reikerpy-main/* /app/ && \
51
+ rm -rf /tmp/reikerpy.zip /build
52
+
53
+ WORKDIR /app
54
+
55
+ RUN pip install --upgrade pip
56
+ RUN pip install --no-cache-dir --root-user-action=ignore -r requirements.txt
57
+
58
+ RUN chmod -R 777 /app
59
+
60
+ EXPOSE 7860
61
+
62
+ CMD ["python", "server.py"]