Spaces:
Sleeping
Sleeping
Commit
·
a10a1a0
1
Parent(s):
e464f8b
remove doker from app dir
Browse files- app/Dockerfile +0 -25
app/Dockerfile
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
FROM python:3.12
|
2 |
-
# Create a new user named 'user' with user ID 1000 and create their home directory
|
3 |
-
RUN useradd -m -u 1000 user
|
4 |
-
# Switch to the newly created user
|
5 |
-
USER user
|
6 |
-
# Add the user's local bin directory to the PATH
|
7 |
-
ENV PATH="/home/user/.local/bin:$PATH"
|
8 |
-
# Pass the secret variable to the application
|
9 |
-
RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true
|
10 |
-
# Set the working directory in the container to /app
|
11 |
-
WORKDIR /app
|
12 |
-
# Copy the requirements.txt file from the host to the container
|
13 |
-
# The --chown=user ensures the copied file is owned by our 'user'
|
14 |
-
COPY --chown=user ./requirements.txt requirements.txt
|
15 |
-
# Install the Python dependencies listed in requirements.txt
|
16 |
-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
17 |
-
# Copy the rest of the application code from the host to the container
|
18 |
-
# Again, ensure the copied files are owned by 'user'
|
19 |
-
COPY --chown=user . /app
|
20 |
-
|
21 |
-
# Add a debug command to check file location (remove this once verified)
|
22 |
-
RUN ls -l /app
|
23 |
-
|
24 |
-
# Specify the command to run when the container starts
|
25 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|