RushiMane2003 commited on
Commit
d14b4e7
·
verified ·
1 Parent(s): 2ae7239

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -11
Dockerfile CHANGED
@@ -1,11 +1,11 @@
1
- FROM python:3.9-slim # Use a minimal Python 3.9 image to reduce size and dependencies.
2
- WORKDIR /app # Set /app as the working directory inside the container.
3
- COPY . . # Copy all project files into the container's /app directory.
4
- RUN pip install --no-cache-dir -r requirements.txt # Install Python dependencies without caching to keep the image lean.
5
- RUN mkdir -p static/uploads static/audio && \ # Create necessary directories for image uploads and audio storage.
6
- touch feedback.json && \ # Create an empty feedback.json file for collecting user feedback.
7
- chmod -R 777 static && \ # Set open permissions on the static directory for file accessibility.
8
- chmod 666 feedback.json # Set read/write permissions on feedback.json.
9
- RUN adduser --disabled-password --gecos '' appuser # Create a non-root user (appuser) to run the app securely.
10
- USER appuser # Switch to the non-root user for running subsequent commands.
11
- CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"] # Launch the app using gunicorn, binding to port 7860.
 
1
+ FROM python:3.9-slim
2
+ WORKDIR /app
3
+ COPY . .
4
+ RUN pip install --no-cache-dir -r requirements.txt
5
+ RUN mkdir -p static/uploads static/audio && \
6
+ touch feedback.json && \
7
+ chmod -R 777 static && \
8
+ chmod 666 feedback.json
9
+ RUN adduser --disabled-password --gecos '' appuser
10
+ USER appuser
11
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]