ar08 commited on
Commit
eee4fae
·
verified ·
1 Parent(s): 009f664

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +76 -0
Dockerfile ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.9 as the base image
2
+ FROM python:3.9
3
+
4
+ # Set environment variables
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+ # Install necessary packages
8
+ RUN apt-get update && \
9
+ apt-get install -y \
10
+ curl \
11
+ sudo \
12
+ build-essential \
13
+ default-jdk \
14
+ default-jre \
15
+ g++ \
16
+ gcc \
17
+ libzbar0 \
18
+ fish \
19
+ ffmpeg \
20
+ nmap \
21
+ ca-certificates \
22
+ zsh \
23
+ curl
24
+
25
+ # Install Node.js (LTS version)
26
+ RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && \
27
+ apt-get install -y nodejs
28
+
29
+ # Install code-server
30
+ RUN curl -fsSL https://code-server.dev/install.sh | sh -s -- --version=4.23.0-rc.2
31
+
32
+ # Install ollama
33
+ RUN curl -fsSL https://ollama.com/install.sh | sh
34
+
35
+ # Create a user to run code-server
36
+ RUN useradd -m -s /bin/zsh coder && \
37
+ echo 'coder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
38
+
39
+ # Create and set the working directory
40
+ RUN mkdir -p /home/coder/genz/roop
41
+ WORKDIR /home/coder/genz/roop
42
+
43
+ # Clone the roop repository
44
+ RUN git clone https://github.com/s0md3v/roop.git .
45
+
46
+ # Change ownership and permissions of the roop directory and its contents
47
+ RUN chown -R coder:coder /home/coder/genz/roop && \
48
+ chmod -R u+rwx /home/coder/genz/roop
49
+
50
+ # Create code-server configuration directory
51
+ RUN mkdir -p /home/coder/.local/share/code-server/User
52
+
53
+ # Add settings.json to enable dark mode
54
+ RUN echo '{ \
55
+ "workbench.colorTheme": "Default Dark Modern", \
56
+ "telemetry.enableTelemetry": true, \
57
+ "telemetry.enableCrashReporter": true \
58
+ }' > /home/coder/.local/share/code-server/User/settings.json
59
+
60
+ # Change ownership of the configuration directory
61
+ RUN chown -R coder:coder /home/coder/.local/share/code-server
62
+
63
+ # Install Python extension for code-server
64
+ RUN sudo -u coder code-server --install-extension ms-python.python
65
+
66
+ # Expose the default code-server port
67
+ EXPOSE 8080
68
+
69
+ # Switch to the coder user for running code-server
70
+ USER coder
71
+ WORKDIR /home/coder/genz
72
+
73
+ # Start code-server with authentication
74
+ CMD ["sh", "-c", "code-server --bind-addr 0.0.0.0:7860 --auth password"]
75
+
76
+ # End of Dockerfile