unknown commited on
Commit
95ceeb7
·
1 Parent(s): dfe8bb9

argergw35

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ WORKDIR /code
4
+
5
+ # Ensure the directory exists and has broad permissions
6
+ RUN mkdir -p /code && chmod -R 777 /code
7
+
8
+ # Copy the requirements file first to leverage Docker cache
9
+ COPY ./requirements.txt /code/requirements.txt
10
+
11
+ # Install Python dependencies
12
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
13
+
14
+ # Copy the rest of the application
15
+ COPY . .
16
+
17
+ # Adjust permissions for everything in /code, to ensure all files are accessible
18
+ RUN chmod -R 777 /code
19
+
20
+ CMD ["gunicorn", "-b", "0.0.0.0:7860", "responses:app"]