Spaces:
Runtime error
Runtime error
adityasugandhi
commited on
Commit
•
3526597
1
Parent(s):
919910a
bug fix
Browse files- Dockerfile +9 -2
Dockerfile
CHANGED
@@ -1,12 +1,19 @@
|
|
1 |
FROM python:3.9.5-slim
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
WORKDIR /app
|
4 |
|
|
|
5 |
COPY ./req.txt /app/req.txt
|
6 |
-
|
7 |
RUN pip install --upgrade pip && \
|
8 |
pip install --no-cache-dir -r req.txt
|
9 |
|
|
|
10 |
COPY . /app
|
11 |
|
12 |
-
|
|
|
|
1 |
FROM python:3.9.5-slim
|
2 |
|
3 |
+
# Create a directory for the application and set permissions
|
4 |
+
RUN mkdir -p /app && \
|
5 |
+
chown -R $USER:$USER /app
|
6 |
+
|
7 |
+
# Set the working directory
|
8 |
WORKDIR /app
|
9 |
|
10 |
+
# Copy requirements file and install dependencies
|
11 |
COPY ./req.txt /app/req.txt
|
|
|
12 |
RUN pip install --upgrade pip && \
|
13 |
pip install --no-cache-dir -r req.txt
|
14 |
|
15 |
+
# Copy the application code
|
16 |
COPY . /app
|
17 |
|
18 |
+
# Run the application
|
19 |
+
CMD ["python", "app.py"]
|