pytailwindcss icon indicating copy to clipboard operation
pytailwindcss copied to clipboard

Pytailwindcss doesn't work with Docker

Open W1mble opened this issue 2 years ago • 3 comments

Setting pytailwindcss in the requirements.txt file causes error after tailwindcss command is ran from bash inside the container.

Dockerfile: COPY requirements.txt /tmp/pip-tmp/ RUN pip --disable-pip-version-check install -r /tmp/pip-tmp/requirements.txt &&
rm -rf /tmp/pip-tmp

Traceback (most recent call last): File "/usr/local/bin/tailwindcss", line 8, in sys.exit(main()) File "/usr/local/lib/python3.10/site-packages/pytailwindcss/main.py", line 9, in main completed_process = pytailwindcss.run( File "/usr/local/lib/python3.10/site-packages/pytailwindcss/init.py", line 45, in run install(version, bin_path) File "/usr/local/lib/python3.10/site-packages/pytailwindcss/init.py", line 69, in install return install_binary(version, ensure_is_pathlib_path(bin_path)) File "/usr/local/lib/python3.10/site-packages/pytailwindcss/installation.py", line 25, in install_binary os.makedirs(bin_path.parent, exist_ok=True) File "/usr/local/lib/python3.10/os.py", line 225, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.10/site-packages/pytailwindcss/bin

If you build your container and run pip install pytailwindcss from the bash and run tailwindcss then it works. But not from the requirements.txt

W1mble avatar Feb 16 '23 18:02 W1mble

Have you found a solution to that?

mpizosdim avatar Jul 19 '23 12:07 mpizosdim

I'm running this with fastAPI and is running totally fine inside the docker container

`FROM tiangolo/uvicorn-gunicorn-fastapi:python3.10

WORKDIR /proj

COPY . . COPY ./requirements.* .

RUN pip install --no-cache-dir --upgrade -r requirements.dev.txt`

The only problem is that even if i update the the code I have to see how to trigger the updates to the scream

jorgeav527 avatar Sep 08 '23 15:09 jorgeav527