Create Dockerfile
Browse files- Dockerfile +18 -0
Dockerfile
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use the official Python image as base image
|
2 |
+
FROM python:3.8-slim
|
3 |
+
|
4 |
+
# Set the working directory in the container
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Copy the current directory contents into the container at /app
|
8 |
+
COPY . /app
|
9 |
+
|
10 |
+
# Install required libraries
|
11 |
+
RUN pip install --no-cache-dir torch==1.8.1+cpu torchvision==0.9.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
|
12 |
+
RUN pip install --no-cache-dir flask transformers
|
13 |
+
|
14 |
+
# Expose the port the app runs on
|
15 |
+
EXPOSE 5000
|
16 |
+
|
17 |
+
# Command to run the Flask app
|
18 |
+
CMD ["python", "app.py"]
|