tejani commited on
Commit
f38e497
·
verified ·
1 Parent(s): 15edb30

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -5
Dockerfile CHANGED
@@ -4,19 +4,26 @@ FROM python:3.10-slim
4
  # Set working directory
5
  WORKDIR /app
6
 
7
- # Install git to clone the repository
8
- RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
 
 
 
 
9
 
10
  # Clone the repository
11
  RUN git clone https://github.com/rupeshs/fastsdcpu.git .
12
 
13
- # Install any Python dependencies if requirements.txt exists
14
- #RUN if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; fi
 
 
 
15
 
16
  # Ensure the start-webserver.sh script is executable
17
  RUN chmod +x start-webserver.sh
18
 
19
- # Expose port if the webserver uses a specific port (default to 8000, adjust if needed)
20
  EXPOSE 8000
21
 
22
  # Run the start-webserver.sh script
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install system dependencies for git and other potential requirements
8
+ RUN apt-get update && apt-get install -y \
9
+ git \
10
+ build-essential \
11
+ libpq-dev \
12
+ && rm -rf /var/lib/apt/lists/*
13
 
14
  # Clone the repository
15
  RUN git clone https://github.com/rupeshs/fastsdcpu.git .
16
 
17
+ # Create a virtual environment
18
+ RUN python -m venv env
19
+
20
+ # Activate virtual environment and install Python dependencies
21
+ RUN . env/bin/activate && pip install --no-cache-dir -r requirements.txt
22
 
23
  # Ensure the start-webserver.sh script is executable
24
  RUN chmod +x start-webserver.sh
25
 
26
+ # Expose port (default to 8000, adjust if the script specifies another port)
27
  EXPOSE 8000
28
 
29
  # Run the start-webserver.sh script