Spaces:
Runtime error
Runtime error
srivatsavdamaraju
commited on
Create Dockerfile
Browse files- Dockerfile +20 -0
Dockerfile
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use Python 3.9 as the base image
|
2 |
+
FROM python:3.9-slim
|
3 |
+
|
4 |
+
# Set environment variables to avoid writing .pyc files
|
5 |
+
ENV PYTHONUNBUFFERED 1
|
6 |
+
|
7 |
+
# Set the working directory in the container
|
8 |
+
WORKDIR /app
|
9 |
+
|
10 |
+
# Copy the requirements.txt file into the container
|
11 |
+
COPY requirements.txt /app/
|
12 |
+
|
13 |
+
# Install dependencies
|
14 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
+
|
16 |
+
# Copy the Python client script into the container
|
17 |
+
COPY client.py /app/
|
18 |
+
|
19 |
+
# Set the command to run the Python client
|
20 |
+
CMD ["python", "app.py"]
|