Spaces:
Sleeping
Sleeping
hoshoo21
commited on
Commit
·
29aea79
1
Parent(s):
9db0e70
fixed
Browse files- Dockerfile +13 -10
Dockerfile
CHANGED
@@ -1,13 +1,16 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
RUN useradd -m -u 1000 user
|
4 |
-
USER user
|
5 |
-
ENV PATH="/home/user/.local/bin:$PATH"
|
6 |
|
|
|
7 |
WORKDIR /app
|
8 |
-
RUN mkdir -p /app/uploads && chown -R user:user /app/uploads
|
9 |
-
COPY --chown=user ./requirements.txt requirements.txt
|
10 |
-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
11 |
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
From Python:3.12.7
|
|
|
|
|
|
|
|
|
2 |
|
3 |
+
# Step 2: Set working directory in the container
|
4 |
WORKDIR /app
|
|
|
|
|
|
|
5 |
|
6 |
+
# Step 3: Copy your app files into the container
|
7 |
+
COPY . /app
|
8 |
+
|
9 |
+
# Step 4: Install dependencies
|
10 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
11 |
+
|
12 |
+
# Step 5: Expose a port (optional, but useful)
|
13 |
+
EXPOSE 7860
|
14 |
+
|
15 |
+
# Step 6: Command to run your app
|
16 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
|