multimodalart HF Staff commited on
Commit
a0f2e08
·
1 Parent(s): 963175f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -0
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.8-slim-buster
3
+
4
+ # Set environment variables
5
+ ENV PYTHONUNBUFFERED 1
6
+
7
+ # Set work directory in the container
8
+ WORKDIR /app
9
+
10
+ # Install necessary packages
11
+ RUN apt-get update \
12
+ && apt-get install -y nginx \
13
+ && apt-get clean
14
+
15
+ # Copy the current directory contents into the container at /app
16
+ COPY . /app
17
+
18
+ # Install any needed packages specified in requirements.txt
19
+ RUN pip install --no-cache-dir -r requirements.txt
20
+
21
+ # Setup NGINX
22
+ RUN rm /etc/nginx/sites-enabled/default
23
+ COPY nginx.conf /etc/nginx/sites-available/
24
+ RUN ln -s /etc/nginx/sites-available/nginx.conf /etc/nginx/sites-enabled/
25
+
26
+ # Expose port for the app
27
+ EXPOSE 7680
28
+
29
+ # Start the application
30
+ CMD service nginx start && python app.py